This page is the drill sheet for the parent topic . We are going to hit every kind of situation Euler's method and direction fields can throw at you — positive slopes, negative slopes, a slope of exactly zero, a curve that bends up, a curve that bends down, a step so big it lies to you, a real word problem, and an exam-style trap.
Before any symbol appears, one reminder in plain words:
Intuition The one rule everything below obeys
The equation d x d y = f ( x , y ) is a slope machine . You feed it a point ( x , y ) (a horizontal position x and a height y ), it hands back a single number: the steepness the solution curve must have right there . Euler's recipe is: stand at a point, ask the machine for the slope, take one small straight step in that direction, repeat.
The step, once and for all:
y n + 1 = y n + h f ( x n , y n ) , x n + 1 = x n + h .
Here h (the step size ) is the horizontal distance you walk each move. "New height = old height + (how far right you walked) × (how steep it is here)."
Definition Convex vs concave — the only fact you need for over/undershoot
Picture the solution curve.
It is convex ("bends up ", holds water like a bowl) when its second derivative y ′′ > 0 . A straight tangent line then sits below the curve, so an Euler step lands too low — an under -shoot.
It is concave ("bends down ", sheds water like a dome) when y ′′ < 0 . A tangent line then sits above the curve, so an Euler step lands too high — an over -shoot.
y ′′ is just "the slope of the slope": if the slope is increasing as you move right, y ′′ > 0 (bowl); if the slope is decreasing , y ′′ < 0 (dome). Remember this one picture — it decides every over/undershoot below.
Every Euler / direction-field problem is some combination of the cells below. The worked examples that follow are each tagged with the cell(s) they cover, so by the end no cell is left blank .
#
Cell (case class)
What is special about it
Covered by
A
Slope f > 0 (rising)
height goes up each step
Ex 1, Ex 4
B
Slope f < 0 (falling)
height goes down each step
Ex 2, Ex 3
C
Slope f = 0 (flat point)
a step that moves only sideways
Ex 3
D
Convex solution y ′′ > 0 (bowl)
Euler under -shoots (tangents below curve)
Ex 1, Ex 3, Ex 6
E
Concave solution y ′′ < 0 (dome)
Euler over -shoots (tangents above curve)
Ex 2
F
Equilibrium / degenerate f ≡ 0 line
solution is a flat line, Euler stays put forever
Ex 3b
G
Step-size effect (halve h )
error roughly halves
Ex 4
H
Big h overshoot / instability
Euler can blow past and oscillate
Ex 5
I
Real-world word problem
naming f , units, interpreting the answer
Ex 6
J
Exam twist (backward vs forward, sign trap)
the classic marks-losing mistakes
Ex 7
d x d y = x + y , y ( 0 ) = 1 , h = 0.5 , find y ( 1 ) .
Forecast: The slope f = x + y starts at 0 + 1 = 1 (positive) and only grows as both x and y grow — the slope is increasing , so y ′′ > 0 : a bowl (convex). Before computing: will Euler land above or below the true curve? Guess now.
Step 1 (n = 0 ): read the slope machine at the start.
f ( 0 , 1 ) = 0 + 1 = 1.
Why this step? Euler always evaluates the slope at the point it is standing on — the left end of the step.
Take the step:
y 1 = 1 + 0.5 ⋅ 1 = 1.5 , x 1 = 0.5.
Why this step? rise = run × slope = 0.5 × 1 = 0.5 , so height climbs from 1 to 1.5 .
Step 2 (n = 1 ): re-read the machine at the new point.
f ( 0.5 , 1.5 ) = 0.5 + 1.5 = 2.
y 2 = 1.5 + 0.5 ⋅ 2 = 2.5 , x 2 = 1.0.
Why this step? The slope must be recomputed — it changed from 1 to 2 because we moved.
Answer: y ( 1 ) ≈ 2.5 .
Verify: The exact solution is y = 2 e x − x − 1 (this is a separable-adjacent linear ODE — compare against Separable First-Order ODEs techniques). Then y ( 1 ) = 2 e − 2 ≈ 3.44 . Euler gave 2.5 , an under -shoot — matching the forecast, because for a bowl (y ′′ > 0 ) each straight tangent step lies below the true curve. Look at the figure: every red step ends beneath the black curve.
Figure 1 — Euler's straight steps (red) lie below the true convex "bowl" curve: an undershoot.
Intuition Before the example — how to tell a dome from a bowl
Learners often pick a "decay" equation expecting a dome and get fooled. Two quick tests fail for the obvious guesses:
y ′ = y (rises): its slope-of-slope is y ′′ = 2 1 > 0 — a bowl , not a dome. The slope keeps growing .
y ′ = − y (falls): its slope-of-slope is also y ′′ = + 2 1 > 0 — still a bowl . Falling curves can flatten from below , which is convex.
The single reliable criterion: a dome needs the slope to be genuinely decreasing (y ′′ < 0 ). The clean example that does this is y ′ = 2 x + 1 1 , whose solution y = x + 1 has y ′′ = − 4 1 ( x + 1 ) − 3/2 < 0 . So rising but ever more gently is the recipe for concave.
d x d y = 2 x + 1 1 , y ( 0 ) = 1 , h = 1 , find y ( 3 ) . (A genuine dome, Cell E.)
Forecast: The slope starts at 2 1 1 = 0.5 and shrinks as x grows — a decreasing slope, so y ′′ < 0 : a dome (concave). Before computing: will Euler land above or below the true curve? Guess now.
Step 1 (n = 0 , at x = 0 ): the slope depends only on x .
f ( 0 ) = 2 1 1 = 0.5.
y 1 = 1 + 1 ⋅ 0.5 = 1.5 , x 1 = 1.
Why this step? rise = run × slope = 1 × 0.5 = 0.5 .
Step 2 (n = 1 , at x = 1 ):
f ( 1 ) = 2 2 1 ≈ 0.3536.
y 2 = 1.5 + 1 ⋅ 0.3536 = 1.8536 , x 2 = 2.
Why this step? The slope is shallower than before (0.354 < 0.5 ) — the slope is decreasing , the signature of a dome (y ′′ < 0 ).
Step 3 (n = 2 , at x = 2 ):
f ( 2 ) = 2 3 1 ≈ 0.2887.
y 3 = 1.8536 + 1 ⋅ 0.2887 = 2.1423 , x 3 = 3.
Answer: y ( 3 ) ≈ 2.142 .
Verify: Exact y = x + 1 , so y ( 3 ) = 4 = 2 . Euler gave 2.142 — an over -shoot, exactly as a dome (y ′′ < 0 ) predicts: each tangent line sits above the true curve, so every step lands too high. This is Cell E done right. Sanity: the slopes fell 0.5 → 0.354 → 0.289 , confirming the curve was bending down the whole way.
Figure 2 — For a concave "dome" curve the red Euler steps ride above the true curve: an overshoot.
Worked example Part (a) — a
falling, convex decay: d x d y = − y , y ( 0 ) = 2 , h = 0.5 , find y ( 1 ) .
Forecast: f = − y < 0 for y > 0 (Cell B, falling). Is it bowl or dome? Slope-of-slope: y ′′ = d x d ( − y ) = − y ′ = − ( − y ) = + y > 0 — a bowl (convex). So predict an under -shoot even though the curve is falling: "falling" does not decide over/undershoot; y ′′ does.
Step 1 (n = 0 ):
f ( 0 , 2 ) = − 2. y 1 = 2 + 0.5 ( − 2 ) = 1 , x 1 = 0.5.
Why this step? Negative slope ⇒ the step goes down : rise = 0.5 × ( − 2 ) = − 1 .
Step 2 (n = 1 ):
f ( 0.5 , 1 ) = − 1. y 2 = 1 + 0.5 ( − 1 ) = 0.5 , x 2 = 1.0.
Why this step? Slope recomputed at the lower point; it is shallower (− 1 vs − 2 ) — the slope is rising toward zero , i.e. increasing, confirming y ′′ > 0 .
Answer: y ( 1 ) ≈ 0.5 .
Verify: Exact y = 2 e − x , y ( 1 ) = 2 e − 1 ≈ 0.736 . Euler gave 0.5 — an under -shoot, matching the bowl prediction (y ′′ = 2 e − x > 0 ). Units/sanity: y stayed positive and shrank, as any decay must. (This is the case that trips people: falling but convex .)
Worked example Part (b) — Cell C + F:
zero slope on an equilibrium line. d x d y = y ( 1 − y ) , y ( 0 ) = 1 , h = 0.5 , find y ( 1.5 ) .
Forecast: f = y ( 1 − y ) = 0 exactly at y = 1 . At y = 1 the machine returns zero — a horizontal dash. What happens if Euler starts on that flat line?
Step 1 (n = 0 ):
f ( x , 1 ) = 1 ( 1 − 1 ) = 0. y 1 = 1 + 0.5 ⋅ 0 = 1 , x 1 = 0.5.
Why this step? Slope exactly 0 ⇒ the step is purely sideways — height unchanged.
Steps 2 & 3: still y = 1 , so f = 0 again: y 2 = 1 , x 2 = 1.0 ; y 3 = 1 , x 3 = 1.5.
Why this step? y = 1 is an equilibrium (a degenerate case: f ≡ 0 along a whole horizontal line). Euler is stuck on it forever — which is exactly correct.
Answer: y ( 1.5 ) = 1 (flat).
Verify: The exact solution with y ( 0 ) = 1 is the constant y ≡ 1 (an equilibrium studied in stability analysis ). Euler reproduces it perfectly: zero slope ⇒ zero rise. In the direction field this is the horizontal row of dashes at height y = 1 ; nearby curves are drawn toward it. See figure: the red equilibrium line is dead flat.
Figure 3 — Logistic direction field: every dash on the red line y = 1 is horizontal, so Euler never leaves it.
Worked example Same as Example 1 (
y ′ = x + y , y ( 0 ) = 1 ) but h = 0.25 , four steps to y ( 1 ) .
Forecast: Example 1 with h = 0.5 gave 2.5 ; the truth is 3.44 . Euler is a first-order method — in plain words, that means the total error shrinks in proportion to the step h : halve h , and you roughly halve the error (not quarter it — proportion, not square). So with half the step we expect an answer meaningfully closer to 3.44 (around 2.9 ). Guess before computing.
Step 1 (n = 0 ): at ( 0 , 1.0000 ) , slope f = 0 + 1 = 1.0000 ; step y 1 = 1.0000 + 0.25 ( 1.0000 ) = 1.2500 , x 1 = 0.25 .
Why this step? Read the slope at the start point and rise by run×slope = 0.25 × 1 = 0.25 .
Step 2 (n = 1 ): at ( 0.25 , 1.2500 ) , slope f = 0.25 + 1.25 = 1.5000 ; step y 2 = 1.2500 + 0.25 ( 1.5000 ) = 1.6250 , x 2 = 0.50 .
Why this step? Slope recomputed at the new point — it grew from 1 to 1.5 because both x and y rose.
Step 3 (n = 2 ): at ( 0.50 , 1.6250 ) , slope f = 0.50 + 1.625 = 2.1250 ; step y 3 = 1.6250 + 0.25 ( 2.1250 ) = 2.1563 , x 3 = 0.75 .
Why this step? Again a fresh slope at the current spot; steeper still, so the rise per step keeps growing.
Step 4 (n = 3 ): at ( 0.75 , 2.1563 ) , slope f = 0.75 + 2.1563 = 2.9063 ; step y 4 = 2.1563 + 0.25 ( 2.9063 ) = 2.8828 , x 4 = 1.00 .
Why this step? Final slope read where we now stand; one more run×slope lands us at x = 1 .
Collected as a table:
n
x n
y n
f = x n + y n
y n + 1 = y n + 0.25 f
0
0.00
1.0000
1.0000
1.2500
1
0.25
1.2500
1.5000
1.6250
2
0.50
1.6250
2.1250
2.1563
3
0.75
2.1563
2.9063
2.8828
Answer: y ( 1 ) ≈ 2.883 .
Verify: Truth is 3.44 . Errors: h = 0.5 gave error 3.44 − 2.50 = 0.94 ; h = 0.25 gives 3.44 − 2.88 = 0.56 . The ratio 0.56/0.94 ≈ 0.60 — not exactly 2 1 because "error proportional to h " is only the leading behaviour that becomes exact as h gets tiny; here h is still fairly big. But the error clearly shrank with smaller h , as first-order accuracy promises. To close the gap much faster you'd switch to RK4 , whose error shrinks like h 4 . See figure comparing the two staircases.
Figure 4 — Two Euler staircases: the finer step (red) hugs the true curve more closely than the coarse one.
d x d y = − 5 y , y ( 0 ) = 1 . Try h = 0.5 for four steps, then explain.
Forecast: The true solution y = e − 5 x decays smoothly to 0 . But the slope is steep (factor 5 ). What could a big step do to a fast-decaying curve? Guess: smooth decay, or wild oscillation?
Steps using y n + 1 = y n + h ( − 5 y n ) = y n ( 1 − 5 h ) = y n ( 1 − 2.5 ) = − 1.5 y n :
y 1 = − 1.5 , y 2 = 2.25 , y 3 = − 3.375 , y 4 = 5.0625.
Why this step? The amplification factor is 1 − 5 h = 1 − 2.5 = − 1.5 . Its size ∣ − 1.5∣ = 1.5 > 1 , so each step magnifies and flips sign — the numbers explode and oscillate .
Answer: Euler gives { − 1.5 , 2.25 , − 3.375 , 5.0625 } — total nonsense versus the true y ( 0.5 ) = e − 2.5 ≈ 0.082 .
Verify: The stability rule for explicit Euler on y ′ = λ y is ∣1 + hλ ∣ ≤ 1 . Here λ = − 5 , so we need ∣1 − 5 h ∣ ≤ 1 , i.e. 0 ≤ h ≤ 0.4 . Our h = 0.5 violates it, hence the blow-up. Redo with h = 0.1 : factor = 1 − 0.5 = 0.5 , giving y 1 = 0.5 , y 2 = 0.25 , ⋯ → 0 — well-behaved. This is exactly the "stiff equation" warning of Stability and Stiff Equations : small h is not just for accuracy, sometimes it's for survival . See figure: the exploding red zig-zag vs the tame decay.
Figure 5 — With an oversized step the red Euler iterates zig-zag and blow up, while the true solution quietly decays.
Common mistake "More steps always means a correct answer."
Why it feels right: smaller h helped in Examples 1 and 4.
Fix: smaller h helps accuracy , but there is a threshold (h ≤ 0.4 above) below which the method is stable and above which it diverges no matter what. Accuracy and stability are two different requirements.
Definition Update rule for the independent variable here
The independent variable is now time t (minutes), so the marching rule reads
t n + 1 = t n + h , T n + 1 = T n + h f ( t n , T n ) .
It is exactly the earlier rule with x renamed to t and y renamed to T (temperature). Starting at t 0 = 0 , one step lands at t 1 = t 0 + h = 1 , the next at t 2 = 2 , and so on.
Worked example A cup of coffee cools by Newton's law: the temperature
T (°C) obeys d t d T = − k ( T − 20 ) with k = 0.2 min − 1 , room at 20° C, starting at T ( 0 ) = 90° C. Estimate T after 2 minutes using h = 1 min.
Forecast: Coffee is far above room temperature, so it should cool fast at first, then slow down (slope ∝ gap T − 20 ). Will 2 minutes of cooling drop it a lot or a little? Guess a range.
Naming f : here f ( t , T ) = − 0.2 ( T − 20 ) . Units check: [ k ] = 1/ min , [ T − 20 ] = ° C, so [ f ] = ° C / min — a genuine rate of temperature change. Good.
Step 1 (n = 0 , at t 0 = 0 , T 0 = 90 ):
f = − 0.2 ( 90 − 20 ) = − 0.2 ⋅ 70 = − 14 ° C/min .
T 1 = 90 + 1 ⋅ ( − 14 ) = 76° C , t 1 = t 0 + h = 1.
Why this step? rise = run × rate = 1 min × ( − 14°/ min ) = − 14° .
Step 2 (n = 1 , at t 1 = 1 , T 1 = 76 ):
f = − 0.2 ( 76 − 20 ) = − 0.2 ⋅ 56 = − 11.2° C/min .
T 2 = 76 + 1 ⋅ ( − 11.2 ) = 64.8° C , t 2 = t 1 + h = 2.
Why this step? The gap shrank, so the cooling rate shrank too (− 11.2 vs − 14 ) — the "slows down" behaviour we forecast.
Answer: T ( 2 ) ≈ 64.8° C.
Verify: Exact solution T = 20 + 70 e − 0.2 t , so T ( 2 ) = 20 + 70 e − 0.4 ≈ 20 + 70 ( 0.6703 ) = 66.9° C. Euler's 64.8 under -shoots the true 66.9 : the cooling curve is a bowl in T (T ′′ > 0 ), tangents lie below, consistent with Cell D. Physically the estimate is sensible (still hot coffee), and the direction of error is exactly what convexity predicts.
d x d y = 2 x − y , y ( 1 ) = 3 . An exam asks for one forward-Euler step with h = − 0.5 to estimate y ( 0.5 ) . (Note the negative step — we walk left .)
Forecast: A negative h means moving to a smaller x . The formula is unchanged; the trap is (a) using the wrong point's slope, and (b) mishandling the sign of h . Watch both.
Step 1 (n = 0 , at x 0 = 1 , y 0 = 3 ):
f ( 1 , 3 ) = 2 ⋅ 1 − 3 = − 1.
Why this step? Explicit (forward) Euler uses the slope at the point you are leaving , ( x 0 , y 0 ) — not at the destination. Using the destination point would be backward/implicit Euler, a different method (and unsolvable here without algebra).
y 1 = y 0 + h f = 3 + ( − 0.5 ) ( − 1 ) = 3 + 0.5 = 3.5 , x 1 = 1 + ( − 0.5 ) = 0.5.
Why this step? Two negatives multiply to a plus : stepping left along a downward slope makes y go up . Both sign flips must be respected.
Answer: y ( 0.5 ) ≈ 3.5 .
Verify: Exact solution of y ′ = 2 x − y , y ( 1 ) = 3 is y = 2 x − 2 + 3 e 1 − x . Check: at x = 1 , y = 2 − 2 + 3 = 3 ✓. At x = 0.5 : y = 1 − 2 + 3 e 0.5 = − 1 + 3 ( 1.6487 ) = 3.946 . Euler's single big backward step gave 3.5 — the right ballpark, and it correctly moved upward despite a negative slope, because h < 0 . The two classic mark-losers (destination-slope trap, sign of h ) are both handled.
Recall Which cell caused the under/overshoot?
Sign of f (rising/falling) decides direction ; sign of y ′′ (bowl/dome) decides over- or under-shoot . ::: Convex y ′′ > 0 (bowl) ⇒ tangents below ⇒ Euler undershoots; concave y ′′ < 0 (dome) ⇒ tangents above ⇒ Euler overshoots.
Recall Stability threshold for
y ′ = λ y ?
What must h satisfy for explicit Euler not to blow up? ::: ∣1 + hλ ∣ ≤ 1 ; for λ = − 5 this needs h ≤ 0.4 .
Recall Negative step size — what changes?
Does the update formula change when h < 0 ? ::: No — same formula y n + 1 = y n + h f ( x n , y n ) ; the negative h automatically walks left.
Mnemonic Two-sign checklist
"Direction from f , curvature from y ′′ ." One tells you up/down (sign of f ), the other tells you Euler's lie: bowl ⇒ undershoot, dome ⇒ overshoot.