Differential-Equations ยท Unit 2 ยท Video 4 ยท Interactive Practice
Halve the Step, Halve the Error: The First-Order Price of Euler's Method
IKey Formulas
Formula
Name
What you need
e=y(xnโ)โynโ
The error โ true value minus Euler value
The exact solution at xnโ, and the computed ynโ
convexโe>0 concaveโe<0
Systematic error: the sign is fixed in advance
The sign of yโฒโฒ along the solution, not only at the start
eโCh
First-order error law (asymptotic, small h)
Nothing computable โ C depends on the equation and on how far you go
e(2hโ)โ21โe(h)
Halve the step, halve the error
One error at one step size
Key Insight:First order counts the power of h in the error, not the order of the differential equation. And it buys one factor of two per round: 210=1024, so a thousandfold cut in the error costs ten halvings and about a thousandfold increase in the number of steps.
IIBigger Step, Bigger Error
Every Euler polygon for yโฒ=x2โy2, y(0)=1 runs below the convex solution; how far below depends on h.
๐ก The polygons stay low because yโฒโฒ>0 along the whole of [0,0.8], checked on the curve itself โ the sign of yโฒโฒ(0) alone guarantees nothing this far out.
IIIHalving the Step, Round by Round
Each halving of h lifts y(0.2) by about half of the previous lift.
h
steps
y(0.2)
change
0.2
1
0.80000
โ
0.1
2
0.82000
0.02000
0.05
4
0.82830
0.00830
0.025
8
0.83213
0.00383
0.0125
16
0.83398
0.00185
hโ0
โ
0.835785
โ
IVPredicting the Next Error
If eโCh, the errors sit on a straight line through the origin.
๐ก Theory never supplies C โ you read it off one computed error. In practice you keep halving until the digits stop moving, and call that the solution.
VQuiz Questions
Problem 1 ยท The Sign of the Error
Given:yโฒ=x2โy2, y(0)=1. Euler's method with h=0.1 returns y2โ=0.82 at x=0.2, and the solution is convex on [0,0.2] โ what can you say about e=y(0.2)โ0.82?
โ Correct! Convexity fixes the sign before anything is computed: Euler runs low, so the true value is the larger one and e>0.
โ Not quite. A convex curve bends up away from every line element, so the broken line falls short. Overshooting is the concave case.
โ The size of e needs the exact solution โ the sign does not. That asymmetry is exactly what makes the error systematic.
โ Not quite.e=y(0.2)โ0.82, and on a convex solution the curve lies above the polygon at every xnโ.
Show solution
By definition the error is the true value minus the computed one:
e=y(xnโ)โynโ
On [0,0.2] the solution is convex, so at each step the curve bends up away from the line element the step follows. Every vertex of the broken line therefore lands below the curve:
y(0.2)>0.82โนe>0
Numerically y(0.2)=0.835785โฆ, so e=0.015785โฆ โ but that number required solving the equation. Convexity gave the sign for free.
That is the complaint against Euler: the miss is guaranteed and its direction is known in advance. A method whose errors scattered above and below would at least sometimes be right.
Problem 2 ยท Two Halvings
Given: on the same problem Euler's method has error eโ0.0158 at h=0.1 โ using eโCh, estimate the error at h=0.025.
โ Correct!0.1โ0.05โ0.025 is two halvings, so the error is quartered: 0.0158/4โ0.0040.
โ Close โ that is one halving. Going from h=0.1 to h=0.025 takes two: 0.1โ0.05โ0.025.
โ That is three halvings.0.1/0.025=4, so divide the error by 4, not by 8.
โ Wrong direction. A smaller step gives a smaller error โ eโCh is a proportionality, so shrinking h shrinks e.
โ Not quite.eโCh means e falls in the same proportion as h.
Show solution
The first-order law makes e proportional to h, so the ratio of the step sizes is the ratio of the errors:
Equivalently, two rounds of halving, each one buying a single factor of 2.
Check against the real computation: eight Euler steps of h=0.025 give y(0.2)=0.83213, so e=0.835785โ0.83213=0.00365. The estimate is a little high, because the successive ratios approach 2from above โ the law is asymptotic, exact only in the limit hโ0.
Problem 3 ยท The Price of Three More Digits
Given: you keep halving h until Euler's error is about one thousandth of what it was โ how many halvings does that take, and what happens to the number of steps?
โ Correct!210=1024โ1000: ten rounds, and since each round doubles the step count, the work grows by the same 210.
โ The count of halvings is right, the work is not. Each round doubles the number of steps, so ten rounds multiply it by 210โ1000.
โ That is the second-order answer. With eโCh2 you would need h/1000โโh/32. Euler's error is only โCh.
โ The thousandfold is the error reduction, not the number of rounds. Each round supplies one factor of 2, and 210 already reaches 1000.
โ Not quite. One halving buys one factor of 2 in the error and costs one doubling of the steps.
Show solution
Since eโCh, dividing the error by 1000 means dividing h by about 1000. Halving is the tool, and each halving supplies exactly one factor of 2:
210=1024โ1000
so ten rounds. Reaching a fixed x with a step size 1024 times smaller needs 1024 times as many steps, so the work grows by the same factor:
hโ1024hโ,nโ1024n
Why this is the whole complaint. A second-order method, eโCh2, would need only
1000โhโโ32hโ,
about five halvings and 32 times the work for the same three digits. Euler creeps; that is why the next step is to replace its slope with a better one.
Problem 4 ยท A Different Equation
Given: a first-order method on some other initial value problem has error โฃeโฃ=0.048 at h=0.08 โ find the step size that brings the error to about 0.006.
โ Correct!Cโ0.048/0.08=0.6, so hโ0.006/0.6=0.01 โ three halvings of 0.08.
โ One halving only takes the error to 0.024. You need a factor of 8, which is three halvings.
โ That is the target error, not a step size. The two are different quantities; divide by C to convert one into the other.
โ 0.08/8โโ0.028 is what a second-order method would need. A first-order error falls only in direct proportion to h.
โ Not quite. Read Cโe/h off the one computation you have, then solve Chโ0.006.
Show solution
Step 1 โ read off the constant. Theory never supplies C; one computed error does:
Cโheโ=0.080.048โ=0.6
Step 2 โ solve for the step size.
Chโ0.006โนhโ0.60.006โ=0.01
Step 3 โ read it as halvings. The error must fall by 0.048/0.006=8, so h must fall by 8:
0.08โ0.04โ0.02โ0.01
three rounds, and eight times as many steps to reach the same point. Note that C is only approximately constant โ it drifts with h and with how far you compute โ so h=0.01 is an estimate, not a guarantee.