Euler’s Method and Local Slopes
Approximate an initial-value problem and compare numerical steps with an exact solution.
Builds on Nonlinear Systems and Local Linearization
The bigger question: How do we trust a numerical trajectory?
On this page
The idea
Euler’s method follows the tangent line over a short time step. Starting from , it uses the slope throughout the next step. The result is an approximation to the solution, not a new exact solution of the original equation.
Method and assumptions
With step , set and . Repeat to the desired time, shortening the final step if necessary. For sufficiently smooth, well-behaved problems over a fixed finite interval, the one-step defect is order and accumulated global error is order .
Worked example: one decay step
For , , and , Euler gives . The exact value is , so the numerical step decays too far.
Worked example: refining at the same endpoint
At , two steps with give . Four steps with give . The exact value is . Smaller steps reduce the error here, but require more evaluations.
Interpreting the result
Compare methods at the same final time. A smoother-looking polyline does not prove accuracy. Step refinement, exact checks when available and stability analysis provide stronger evidence.
Explore
Try this. Keep the decay rate at 1 and compare 4, 8 and 16 steps. Then use rate 3 with one step: the numerical result fails to follow exact decay. Refine the steps to recover the shape.
This explorer compares Euler steps with the exact solution of on . Change the decay rate, starting value or step count and compare error with the stability factor.
Try it yourself.
Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.
Hint 1 · Find a starting point
Euler takes one step along the current slope.
Hint 2 · Take the next step
Use y₁=y₀+h f(t₀,y₀).
Show the reasoning
Answer: 1.1
1+0.1×1=1.1. This approximates, but is not exactly, e⁰·¹.
Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.
Practice
- Take one Euler step for from with .
- What is the decay amplification factor for ?
- How many equal steps of reach from zero?
Show worked solutions
- .
- , so .
- steps.
Further study
MIT OpenCourseWare: Differential Equations provides a full university course with additional lectures and exercises.
Pause before the next idea.
Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.