Euler Method Calculator
Solve an ODE numerically using Euler's forward method with step size control.
Inputs
Right-hand side using x and y.
y(target x)
3.40962766
Step size h
0.01000000
Steps used
100
Step by step
Values used
dy/dx = f(x, y) = x + y; Initial x₀ = 0; Initial y₀ = 1; Target x = 1; Steps = 100
Euler step
y(n+1) = y(n) + h · f(x(n), y(n))
y(target x)
= 3.40962766
Step size h
= 0.01000000
Steps used
= 100
How it works
Euler's method is the simplest ODE solver: y_{n+1} = y_n + h·f(x_n, y_n). It advances the solution by one step of size h using the slope at the current point. The method has O(h) global error (first-order), meaning you need many small steps for accuracy. It's excellent for teaching but RK4 is preferred in practice.
Formula
Euler step
y(n+1) = y(n) + h · f(x(n), y(n))
- h
- Step size (xTarget - x0)/steps
- f(x,y)
- Right-hand side of ODE
Frequently Asked Questions
Why is Euler's method less accurate than RK4?
Euler uses only the slope at the start of each step (first-order). RK4 samples the slope at four points per step, achieving O(h⁴) accuracy vs O(h) for Euler.
When might Euler's method be preferred?
For quick estimates, stiff equation detection, or when implementing in hardware with limited computation. It's also used as a building block in more complex adaptive schemes.