Euler Method Visualizer

change step size and watch global error accumulate

Loading interactive simulation...

First-order numerical integration propagation errors 🖖

Euler's method is a first-order numerical procedure for solving ordinary differential equations with a given initial value. It steps forward using the tangent line: y_{n+1} = y_n + h * f(x_n, y_n). While simple, it accumulates truncation error at O(h) locally and O(h) globally. If the step size h is too large, the method can diverge rapidly, especially in stiff differential equations where stability bounds are tight.

Following the slope one step at a time 🖖

Euler's method is the simplest honest guess: from where you are, head in the direction the equation says the curve is going, walk a short distance h, then stop and re-aim. The exact curve keeps bending, but a straight step ignores that bend and drifts off. The practical takeaway: because the method is first-order, halving h roughly halves the final error — a quick convergence check this tool makes visible.

Where the number e hides inside Euler 🖖

Apply Euler's method to the equation y' = y starting at y = 1, and each step simply multiplies by (1 + h). Take N steps of size h = 1/N across the interval [0, 1] and the result is exactly (1 + 1/N)N — the very formula for compound interest. As N grows it converges to e ≈ 2.71828, so Euler's crude straight-line stepping quietly reconstructs continuous compounding and the definition of the exponential.

Example problems