4.6.2 · D3Ordinary Differential Equations

Worked examples — Direction fields and Euler's method — visual - numerical intuition first

3,005 words14 min readBack to topic

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:


The scenario matrix

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 (rising) height goes up each step Ex 1, Ex 4
B Slope (falling) height goes down each step Ex 2, Ex 3
C Slope (flat point) a step that moves only sideways Ex 3
D Convex solution (bowl) Euler under-shoots (tangents below curve) Ex 1, Ex 3, Ex 6
E Concave solution (dome) Euler over-shoots (tangents above curve) Ex 2
F Equilibrium / degenerate line solution is a flat line, Euler stays put forever Ex 3b
G Step-size effect (halve ) error roughly halves Ex 4
H Big overshoot / instability Euler can blow past and oscillate Ex 5
I Real-world word problem naming , units, interpreting the answer Ex 6
J Exam twist (backward vs forward, sign trap) the classic marks-losing mistakes Ex 7

Example 1 — Cell A + D: rising slope, convex (bowl) curve

Figure 1 — Euler's straight steps (red) lie below the true convex "bowl" curve: an undershoot.


Example 2 — Cell E: a concave (dome) curve, and how to spot one

Figure 2 — For a concave "dome" curve the red Euler steps ride above the true curve: an overshoot.


Example 3 — Cell B + D and Cell C + F: a decay, and its equilibrium

Figure 3 — Logistic direction field: every dash on the red line is horizontal, so Euler never leaves it.


Example 4 — Cell A + G: halve the step, watch the error shrink

Figure 4 — Two Euler staircases: the finer step (red) hugs the true curve more closely than the coarse one.


Example 5 — Cell H: a step so big Euler goes unstable

Figure 5 — With an oversized step the red Euler iterates zig-zag and blow up, while the true solution quietly decays.


Example 6 — Cell I + D: real-world word problem


Example 7 — Cell J: the exam twist (forward vs backward Euler, sign trap)


Recall

Recall Which cell caused the under/overshoot?

Sign of (rising/falling) decides direction; sign of (bowl/dome) decides over- or under-shoot. ::: Convex (bowl) ⇒ tangents below ⇒ Euler undershoots; concave (dome) ⇒ tangents above ⇒ Euler overshoots.

Recall Stability threshold for

? What must satisfy for explicit Euler not to blow up? ::: ; for this needs .

Recall Negative step size — what changes?

Does the update formula change when ? ::: No — same formula ; the negative automatically walks left.


Connections