Read this lesson as text

Euler's Method Algorithm

Calculus 2 · Axiom Academy

When a differential equation has no formula for its solution, walk the curve one tangent step at a time. You stand at a point (x_n, y_n) that lies on the solution curve. The differential equation hands you the slope there, f(x_n, y_n) — the direction the curve is heading. Euler's idea: instead of following the (unknown) curve, follow its tangent line for one short step of width , and call where you land the next point. the new y = old y + slope × step Here is the step size , often written h . A horizontal move of h paired with a vertical move of takes a single step along the tangent. 2. Marching Across an Interval Repeat the step and you march across the whole interval. Take with y(0)=1 , step size , and approximate y(1) . At each node, read the slope from f(x,y)=x+y , then step. Euler returned 2.5 — it undershoots because each tangent step cuts the corner on a curve that bends upward. Watch the orange Euler path peel away from the blue true solution: the vertical gap between them is the error , and it grows with every step. 3. Smaller Steps, Smaller Error The error is not random — it is controlled by the step size. Shrink and the tangent path hugs the true curve more tightly. Two error scales describe how: The error made in a single step (assuming you started it exactly). For Euler's method it is . The total error accumulated from x_0 to x_n over all the steps. For Euler's method it is .

This is the written version of the interactive lesson above. See the full Calculus 2 course.