Most differential equations have no formula solution. Numerical methods step forward from a known starting point instead.
Step 1: Let's Learn
Read it, or press Listen and follow the words.
The method
From the current point, compute the slope, follow the tangent line for a small step h, and land on a new point. Then repeat.
The formula
yₙ₊₁ = yₙ + h × f(xₙ, yₙ). It is nothing more than a straight-line approximation applied repeatedly.
Where the error comes from
The true solution curves away from the tangent line during each step. That small gap accumulates over many steps.
Smaller steps
Halving the step roughly halves the total error, at the cost of twice as many steps. Accuracy is bought with work.
Better methods exist
Runge-Kutta methods sample the slope several times per step and are far more accurate for the same effort. Euler is the idea in its simplest form.
Step along the tangent
Euler's method starts at the initial condition and steps forward using the slope at the current point, recomputing at each new one. It is repeated linear approximation.
The step
yₙ₊₁ = yₙ + h·f(xₙ, yₙ), with h the step size. The whole method is that line applied repeatedly, which makes it the simplest possible numerical scheme.
Error accumulates
Each step introduces error and later steps build on the drift. Halving the step size roughly halves the total error, which makes Euler first-order accurate and rather slow to converge.
The error has a predictable direction
For a concave-up solution the tangent lies below the curve, so Euler underestimates consistently. Knowing the direction of the bias is often as useful as knowing its size.
Step 2: Try It Yourself
Tap and try it out.
- Point(1, 0.75)
- Slope of the tangent-0.22
Step 3: Watch an Example
One step at a time.
Watch Petra Take Two Steps
Petra applies Euler to dy/dx = y with y = 1 at x = 0 and a step of 0.5.
- Step 1
She computes the slope at the start, which is y = 1.
Step 4: Your Turn
Practice makes it stick.
The First Step
Problem 1 of 2
dy/dx = 2y with y = 3 and a step of 0.1. What is y after one step?
The Step Count
Problem 2 of 2
Travelling from x = 0 to x = 2 with a step of 0.25. How many steps are needed?
Step It Out
1 of 8
dy/dx = y with y = 2 and a step of 0.5. What is y after one step?
2 of 8
dy/dx = 4 with y = 1 and a step of 0.25. What is y after one step?
3 of 8
From x = 0 to x = 3 with a step of 0.5. How many steps?
4 of 8
Halving the step size. Does the accumulated error roughly halve? 1 yes, 0 no.
5 of 8
dy/dx = 3y with y = 1 and a step of 0.2. What is y after one step?
6 of 8
A solution that is exactly a straight line. Does Euler make any error? 1 yes, 0 no.
7 of 8
Order the steps of one Euler iteration.
- 1Multiply that slope by the step size
- 2Add the result to the current y
- 3Advance x by the step size
- 4Compute the slope at the current point
8 of 8
dy/dx = 0 with y = 7 and any step size. What is y after one step?
Step 5: Quick Check
Show what you know.
Question 1 of 2
dy/dx = y with y = 4 and a step of 0.25. What is y after one step?
Question 2 of 2
Where does Euler's error come from?
What You Learned
- Euler's method steps forward along the tangent line: yₙ₊₁ = yₙ + h f(xₙ, yₙ).
- The error comes from the solution curving away from each straight step, and it accumulates.
- Smaller steps buy accuracy with more work, and better methods buy more per step.