4.6.2 · D2Ordinary Differential Equations

Visual walkthrough — Direction fields and Euler's method — visual - numerical intuition first

2,145 words10 min readBack to topic

We never use a symbol before drawing it. Let us start from the one thing an ODE actually hands us.


Step 1 — The ODE hands you a slope, not a curve

WHAT. A first-order ODE looks like Read each piece:

  • ::: the horizontal position (how far right you are).
  • ::: the height of the solution curve at that position.
  • ::: the slope — how fast rises as moves right. "Rise per unit run."
  • ::: a machine: feed it a point , it spits out a number — and that number is the slope you must have there.

WHY. Most equations tell you what a thing equals. This one refuses. It never says " is such-and-such." It only says: whatever your curve is, at the point its steepness must be exactly . So we cannot look up the answer — we must construct it by obeying the slope everywhere.

PICTURE. At a single point, the ODE plants one tiny tilted dash: the slope it demands.

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

Step 2 — Plant a slope at every point: the direction field

WHAT. Do Step 1 not once but on a whole grid of points. At each draw a short segment whose tilt equals . That carpet of dashes is the direction field (also called the slope field).

For our running example we choose so the slope at a point is just "your right-position plus your height."

WHY. A single dash is a local rule. The field is the rule made global — a map of every command the ODE issues. A solution is then any curve that stays tangent to the dash it is standing on at every instant. No dash is ever crossed sideways.

Here is a shortcut for drawing that carpet by hand. Instead of computing a slope at each grid point one by one, look for the curves along which the slope is a fixed number — these are called isoclines (from "iso" = same, "cline" = slope).

How to use isoclines to speed up the drawing: pick a few values of (say ), draw the lines , and along each line simply copy one and the same tilt (slope ) onto a row of short dashes. Because a whole line shares one slope, you fill the field in strokes rather than point-by-point — the picture appears almost for free.

PICTURE. Notice the dashes flatten to horizontal exactly where (the anti-diagonal): that flat line is the isocline for . Move up-right and the dashes steepen along the isoclines for larger .

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

Step 3 — Pin down ONE curve with a starting point

WHAT. The field alone has infinitely many curves threading it (one through every point). To select a single one we add an initial condition:

  • ::: where we choose to start.
  • ::: the height we start at.

WHY. Think of the field as a river of arrows. Drop a leaf at one spot and it traces exactly one path. Drop it elsewhere and you get a different path. The starting point is which leaf. (When exactly one path exists is the job of Existence and Uniqueness (Picard–Lindelöf).)

PICTURE. The red dot is our leaf at ; the ghostly curve is the true trail we are trying to trace.

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

Step 4 — Why a straight step? The tangent-line idea

WHAT. We cannot see the whole curve. But at our current point we can read its slope — the ODE gives it: . So we approximate the curve near the start by its tangent line and walk along that instead:

  • ::: the step size — how far right we walk before re-reading the slope (the "run").
  • ::: the "rise" = run × slope. This is the whole trick: rise equals slope times run.

WHY this tool — the tangent? Because the derivative is defined as the slope of the tangent line, and a tangent is the best straight-line copy of a curve near a point. Over a tiny run the curve barely bends, so the straight step lands very close to the true curve. This is exactly the first-order Taylor expansion and we substitute from the ODE. We keep the straight part, discard the bendy part.

PICTURE. Green = the true curve, blue = the straight tangent step. They agree at the start and slowly drift apart.

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

Step 5 — Take the FIRST step (n = 0), by hand

WHAT. With , , :

WHY. We move right by the run along slope , so the rise is , landing at height . We walked one straight segment of the blue line from Step 4.

PICTURE. Watch the blue landing point sit slightly below the green true curve — the curve bends upward and left our straight step behind.

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

Step 6 — RE-READ the slope and take the SECOND step (n = 1)

WHAT. Now stand at the new point and read a fresh slope:

WHY. Explicit Euler always uses the slope where it currently stands — the left point of the new step, because the point it is walking to isn't known yet. Each step gets its own tilt; that is why the blue path is a chain of segments that bends to chase the field.

PICTURE. Two blue segments now, each tilted differently, tracking the field arrows underneath.

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

Answer so far: . The exact solution is , so . Euler under-shoots — see the next step for the reason.


Step 7 — WHY Euler under-shoots here (the convexity picture)

WHAT. The true curve here is convex — a fancy word for "bends upward, like a smile." Concretely, convex means the second derivative is positive, : the slope itself keeps increasing as you move right. A tangent line to such an upward-bending curve lies below the curve. So every straight step lands too low, and the errors pile up.

WHY. The discarded Taylor term was . When that term is positive — it is exactly the height we dropped. Positive dropped height ⇒ we land below. If instead the curve were concave (bends downward, ) that term would be negative and Euler would over-shoot. If the curve were a straight line () Euler would be exact. Three cases, one rule: the sign of tells you which way the curve bends away from the straight step.

PICTURE. The vertical red gaps are the missing pieces, one per step, all pointing the same way.

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

Step 8 — Smaller steps, closer walk: the error is

WHAT. Halve the step to (now 4 steps to reach ):

So closer to than the coarse .

WHY and not . Each step costs error . To cross an interval of length you take steps. Total . The step-count eats one power of , leaving global error : halve , roughly halve the error. That is what "first-order method" means. (Sampling several slopes per step to beat this is the idea of Runge-Kutta Methods (RK4).)

PICTURE. Two Euler walks over the same field: coarse (fewer, longer segments, far from green) vs fine (more, shorter segments, hugging green).

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

The one-picture summary

Everything above in a single frame: the field of dashes (the ODE's commands), the smooth true curve (the exact solution), and the blue chain of tangent steps that Euler builds by standing, reading the slope, and stepping — always a little below because the curve bends up.

Figure — Direction fields and Euler's method — visual - numerical intuition first
Recall Feynman retelling — the whole walk in plain words

You're lost in fog on a hillside. A magic compass () tells you the steepness right where you stand, but nothing about the rest of the hill. So you commit to a tiny straight step in that direction (rise = slope × step). Then you ask the compass again at your new spot, get a fresh steepness, and take another tiny straight step. The zig-zag trail you leave is your best guess of the real path. Because the real trail curves upward and your steps are straight, you keep landing a hair too low — the gaps are the crumbs you dropped. Take smaller steps and you drop smaller crumbs and take more of them, so the total shortfall shrinks in proportion to the step size. That is Euler's method: Stand, Slope, Step — first-order accurate, honest, and the ancestor of every fancier ODE solver.

Recall Quick self-test

Which point's slope does step 6 use? ::: The current/left point , giving . Why does our walk land below the true curve? ::: The solution is convex (), so tangent steps lie under the curve. Coarse vs fine vs exact? ::: vs vs ; smaller is closer. Why is the global error ? ::: Per-step error times steps gives .


Connections

  • Taylor's Theorem — the tangent step and the discarded crumb.
  • Separable First-Order ODEs — how we got the exact to compare against.
  • Runge-Kutta Methods (RK4) — sample several slopes per step to shrink the crumb faster.
  • Existence and Uniqueness (Picard–Lindelöf) — why one starting point pins exactly one curve, and the Lipschitz hypothesis.
  • Stability and Stiff Equations — when tiny steps still can't save explicit Euler, and why implicit Euler helps.