Differential-Equations ยท Unit 2 ยท Video 4 ยท Interactive Practice

Halve the Step, Halve the Error: The First-Order Price of Euler's Method

IKey Formulas

FormulaNameWhat you need
e=y(xn)โˆ’yne = y(x_n) - y_nThe error โ€” true value minus Euler valueThe exact solution at xnx_n, and the computed yny_n
convexโ‡’e>0\text{convex} \Rightarrow e > 0
concaveโ‡’e<0\text{concave} \Rightarrow e < 0
Systematic error: the sign is fixed in advanceThe sign of yโ€ฒโ€ฒy'' along the solution, not only at the start
eโ‰ˆChe \approx C hFirst-order error law (asymptotic, small hh)Nothing computable โ€” CC depends on the equation and on how far you go
eโ€‰โฃ(h2)โ‰ˆ12โ€‰e(h)e\!\left(\tfrac{h}{2}\right) \approx \tfrac{1}{2}\, e(h)Halve the step, halve the errorOne error at one step size

Key Insight: First order counts the power of hh in the error, not the order of the differential equation. And it buys one factor of two per round: 210=10242^{10} = 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โˆ’y2y' = x^2 - y^2, y(0)=1y(0) = 1 runs below the convex solution; how far below depends on hh.

๐Ÿ’ก The polygons stay low because yโ€ฒโ€ฒ>0y'' > 0 along the whole of [0,0.8][0, 0.8], checked on the curve itself โ€” the sign of yโ€ฒโ€ฒ(0)y''(0) alone guarantees nothing this far out.

IIIHalving the Step, Round by Round

Each halving of hh lifts y(0.2)y(0.2) by about half of the previous lift.

hhstepsy(0.2)y(0.2)change
0.20.2110.800000.80000โ€”

IVPredicting the Next Error

If eโ‰ˆChe \approx Ch, the errors sit on a straight line through the origin.

๐Ÿ’ก Theory never supplies CC โ€” 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โˆ’y2y' = x^2 - y^2, y(0)=1y(0) = 1. Euler's method with h=0.1h = 0.1 returns y2=0.82y_2 = 0.82 at x=0.2x = 0.2, and the solution is convex on [0,0.2][0, 0.2] โ€” what can you say about e=y(0.2)โˆ’0.82e = 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>0e > 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 ee needs the exact solution โ€” the sign does not. That asymmetry is exactly what makes the error systematic.
โŒ Not quite. e=y(0.2)โˆ’0.82e = y(0.2) - 0.82, and on a convex solution the curve lies above the polygon at every xnx_n.
Show solution

By definition the error is the true value minus the computed one:

e=y(xn)โˆ’yne = y(x_n) - y_n

On [0,0.2][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>0y(0.2) > 0.82 \quad \Longrightarrow \quad e > 0

Numerically y(0.2)=0.835785โ€ฆy(0.2) = 0.835785\ldots, so e=0.015785โ€ฆe = 0.015785\ldots โ€” 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.0158e \approx 0.0158 at h=0.1h = 0.1 โ€” using eโ‰ˆChe \approx Ch, estimate the error at h=0.025h = 0.025.

โœ… Correct! 0.1โ†’0.05โ†’0.0250.1 \to 0.05 \to 0.025 is two halvings, so the error is quartered: 0.0158/4โ‰ˆ0.00400.0158/4 \approx 0.0040.
โŒ Close โ€” that is one halving. Going from h=0.1h = 0.1 to h=0.025h = 0.025 takes two: 0.1โ†’0.05โ†’0.0250.1 \to 0.05 \to 0.025.
โŒ That is three halvings. 0.1/0.025=40.1/0.025 = 4, so divide the error by 44, not by 88.
โŒ Wrong direction. A smaller step gives a smaller error โ€” eโ‰ˆChe \approx Ch is a proportionality, so shrinking hh shrinks ee.
โŒ Not quite. eโ‰ˆChe \approx Ch means ee falls in the same proportion as hh.
Show solution

The first-order law makes ee proportional to hh, so the ratio of the step sizes is the ratio of the errors:

e(0.025)e(0.1)โ‰ˆ0.0250.1=14\frac{e(0.025)}{e(0.1)} \approx \frac{0.025}{0.1} = \frac{1}{4} e(0.025)โ‰ˆ0.01584โ‰ˆ0.0040e(0.025) \approx \frac{0.0158}{4} \approx 0.0040

Equivalently, two rounds of halving, each one buying a single factor of 22.

Check against the real computation: eight Euler steps of h=0.025h = 0.025 give y(0.2)=0.83213y(0.2) = 0.83213, so e=0.835785โˆ’0.83213=0.00365e = 0.835785 - 0.83213 = 0.00365. The estimate is a little high, because the successive ratios approach 22 from above โ€” the law is asymptotic, exact only in the limit hโ†’0h \to 0.

Problem 3 ยท The Price of Three More Digits

Given: you keep halving hh 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โ‰ˆ10002^{10} = 1024 \approx 1000: ten rounds, and since each round doubles the step count, the work grows by the same 2102^{10}.
โŒ The count of halvings is right, the work is not. Each round doubles the number of steps, so ten rounds multiply it by 210โ‰ˆ10002^{10} \approx 1000.
โŒ That is the second-order answer. With eโ‰ˆCh2e \approx Ch^2 you would need h/1000โ‰ˆh/32h/\sqrt{1000} \approx h/32. Euler's error is only โ‰ˆCh\approx Ch.
โŒ The thousandfold is the error reduction, not the number of rounds. Each round supplies one factor of 22, and 2102^{10} already reaches 10001000.
โŒ Not quite. One halving buys one factor of 22 in the error and costs one doubling of the steps.
Show solution

Since eโ‰ˆChe \approx Ch, dividing the error by 10001000 means dividing hh by about 10001000. Halving is the tool, and each halving supplies exactly one factor of 22:

210=1024โ‰ˆ10002^{10} = 1024 \approx 1000

so ten rounds. Reaching a fixed xx with a step size 10241024 times smaller needs 10241024 times as many steps, so the work grows by the same factor:

hโ†’h1024,nโ†’1024โ€‰nh \to \frac{h}{1024}, \qquad n \to 1024\,n

Why this is the whole complaint. A second-order method, eโ‰ˆCh2e \approx Ch^2, would need only

h1000โ‰ˆh32,\frac{h}{\sqrt{1000}} \approx \frac{h}{32},

about five halvings and 3232 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|e| = 0.048 at h=0.08h = 0.08 โ€” find the step size that brings the error to about 0.0060.006.

โœ… Correct! Cโ‰ˆ0.048/0.08=0.6C \approx 0.048/0.08 = 0.6, so hโ‰ˆ0.006/0.6=0.01h \approx 0.006/0.6 = 0.01 โ€” three halvings of 0.080.08.
โŒ One halving only takes the error to 0.0240.024. You need a factor of 88, which is three halvings.
โŒ That is the target error, not a step size. The two are different quantities; divide by CC to convert one into the other.
โŒ 0.08/8โ‰ˆ0.0280.08/\sqrt{8} \approx 0.028 is what a second-order method would need. A first-order error falls only in direct proportion to hh.
โŒ Not quite. Read Cโ‰ˆe/hC \approx e/h off the one computation you have, then solve Chโ‰ˆ0.006Ch \approx 0.006.
Show solution

Step 1 โ€” read off the constant. Theory never supplies CC; one computed error does:

Cโ‰ˆeh=0.0480.08=0.6C \approx \frac{e}{h} = \frac{0.048}{0.08} = 0.6

Step 2 โ€” solve for the step size.

Chโ‰ˆ0.006โŸนhโ‰ˆ0.0060.6=0.01Ch \approx 0.006 \quad \Longrightarrow \quad h \approx \frac{0.006}{0.6} = 0.01

Step 3 โ€” read it as halvings. The error must fall by 0.048/0.006=80.048/0.006 = 8, so hh must fall by 88:

0.08โ†’0.04โ†’0.02โ†’0.010.08 \to 0.04 \to 0.02 \to 0.01

three rounds, and eight times as many steps to reach the same point. Note that CC is only approximately constant โ€” it drifts with hh and with how far you compute โ€” so h=0.01h = 0.01 is an estimate, not a guarantee.

Solved: 0 / 4