Math

Euler’s Method

Euler’s method approximates a solution curve by stepping along the tangent line. Change the step size and watch the numerical solution converge to the exact curve.

6 minLevel 2/3The interactive stage stays ad-free.
ODEy′ = x − yStep h0.25Euler y(4)3.020Exact y(4)3.037Error0.017

Euler’s method starts at (0, 1) and follows the tangent slope y′ = x − y for a fixed step h. The cyan polyline is the numerical approximation; amber is the exact curve y = x − 1 + 2e⁻ˣ. Smaller h follows the curve more closely but needs more steps.

What you are seeing

1

Start at a known point. The differential equation gives the slope there.

2

Move a horizontal step h and update y by h times the slope. Repeat.

3

Smaller steps usually give better accuracy, but require more computation. The error is first-order in h.

Why it matters

Euler’s method is the simplest numerical ODE solver and the conceptual base for Runge-Kutta, simulation, and control systems.

Complexity & details

Simulating T time units with step h costs O(T/h) evaluations.

Frequently asked questions

Why does Euler’s method drift?+

It follows the tangent line instead of the true curve. Curvature causes error to accumulate at every step.

What is a better method?+

Runge-Kutta methods evaluate the slope several times per step and achieve much higher accuracy for the same step size.