Euler's Method
When you can't solve an equation exactly, you can still walk along its direction field: use the slope where you are to take a short straight step, then look up the new slope and repeat. Smaller steps hug the true curve more closely.
What the symbols mean
- Step size
How far each step goes in t.
- Current slope
The direction field's slope where you are now.
Explanation
Euler's method is simply a way to approximate a solution with lots of short straight steps when you can't find a formula for it. It's named after Leonhard Euler, who described it in the 1760s, and it's the starting point for the methods computers use to simulate almost everything. All we're really doing is walking in a straight line for a little while, then checking which way to go next. The formula looks technical, but it's just three pieces: (where you are now), (the slope the equation says you should have right here) and (how far you step). New height = old height + step length times slope, the same "rise = slope times run" you learned in algebra. It looks complex, but it's just a few simple parts, so bear with it.
Remember the direction fields lesson: every point comes with a slope, and solutions follow those slopes. Euler's method takes that literally. It follows the tangent line for a short distance, then recomputes the slope. It's the linear approximation from Calculus 1, repeated over and over. There's an animation further down that shows the steps falling behind the true curve.
Accuracy. The error at a fixed time is roughly proportional to : halve the step, halve the error. That's slow, which is why real software uses higher-order methods like Runge–Kutta (error about proportional to ).
A common mistake. It's tempting to think the error should shrink like , because that's the size of the error a single tangent-line step makes. It doesn't. To reach a fixed time you take about steps, and those small errors add up, so the total ends up roughly proportional to .
Stability. With too large a step, the method can oscillate wildly or blow up even when the true solution is calm. For , any makes the numbers grow. Think about why: each step multiplies by the same factor, and if the step is big enough, that factor overshoots past zero by more than it started with.
See it
Worked examples
Use Euler's method with on , , for two steps.
- 1
The slope at the start, , is , so .
Practice
Type your answer and check it. Solve them all to complete the lesson.
Use Euler's method on , , with , to estimate .
What is the error of that estimate? (The exact value is .)
Use Euler's method on , , with , to estimate .
If you halve the step size, roughly what happens to Euler's error?
One Euler step for from with gives what?
A drone's battery starts at C and warms toward C by , with in minutes. Use Euler's method with to estimate .
The hardest one here. Get it, and you've got this lesson.
The solution of , decays to , but Euler's method with a large step can produce approximations that grow instead. Find the step size beyond which this happens.
Where it's used
Physics engines in games use Euler-style steps every frame; climate and orbit simulations use the same idea with more accurate methods and carefully chosen step sizes.