Read this lesson as text

Approximating y(1) for dy/dx = x + y, y(0) = 1

Calculus 2 · Axiom Academy

EXAMPLE Approximating y(1) for , y(0) = 1 Stepping along tangent lines with Euler's method to estimate a solution we can't easily read off The differential equation with y(0) = 1 does have a closed-form solution, but suppose we only trust a numerical tool. Use Euler's method with step size h = 0.25 to march from x = 0 out to x = 1 , taking four steps, and approximate y(1) . Nicely done. You marched four Euler steps along the tangent lines of the slope field and landed on . Here is what the run shows. The update rule: — each new estimate is the old one plus the step size times the current slope. It is iterative: every step feeds the next, so the estimate at x = 1 is built on the estimates before it. Step size sets the count: with h = 0.25 it takes four steps to cross from x = 0 to x = 1 . Approximation, not truth: the exact solution gives , so our linear-step estimate undershoots by about 0.55 . Error accumulates: the gap widens at every node, because each step starts from an already-imperfect point. Euler estimate vs. exact solution The exact solution here is y = 2e^x - x - 1 . Each step assumes the slope stays fixed across the whole interval, so the estimate drifts below the true curve a little more each time. Shrinking h — or upgrading to a method like Improved Euler or Runge–Kutta — tightens the gap.

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