4.8.23 · D1Numerical Methods

Foundations — Modified Euler (Heun's method)

1,895 words9 min readBack to topic

This page assumes you have seen nothing. Before we can even read , we must build every piece of it. We go slow, one symbol at a time, and each new symbol only appears after it has a plain-words meaning and a picture.


1. Points, functions, and the picture

Look at Figure 1. The horizontal chalk line is the -axis (distance travelled). The vertical chalk line is the -axis (height). A curve is just the record of your height at every position — a path.

Figure — Modified Euler (Heun's method)

Why does the topic need and not just ? Because the correct next direction can depend on both where you are and how high you are. A hill's steepness at a spot may change depending on your altitude, so the machine needs both inputs.


2. Slope: the single most important picture

Look at Figure 2. The little right triangle under the tangent line has a horizontal leg (the run) and a vertical leg (the rise). Slope .

Figure — Modified Euler (Heun's method)

Sign cases you must recognise:

  • Slope → curve rising (uphill).
  • Slope → curve momentarily flat (a peak, valley, or plateau).
  • Slope → curve falling (downhill).

In Example 2 of the parent, the start slope was exactly zero, meaning the curve leaves the start flat before bending down. That is the "slope " case in the flesh.


3. The derivative and the symbol

Why does the topic need a special symbol for "slope at an instant"? Because a curve's slope changes from point to point. Rise-over-run over a big run gives an average; the derivative gives the slope at one exact place, which is what we need to aim our next step.


4. The differential equation and the initial condition

Look at Figure 3: many candidate curves share the slope rule (pale chalk), but only the one through the marked anchor point (yellow dot) is our solution.

Figure — Modified Euler (Heun's method)

5. The step size and the next point


6. The integral sign — adding up tiny pieces

Why does the topic need an integral? Because the slope rule only gives instantaneous directions; to recover an actual height you must accumulate all those directions across the step. Accumulating tiny pieces is integration. The differences between Euler and Heun are just different shortcuts for estimating this one sum — see Euler's Method (left-rectangle) versus Trapezoidal Rule (average the two ends).


7. The predictor / corrector labels


Prerequisite map

Points x and y on axes

Slope rise over run

Derivative dy dx equals y prime

Slope rule dy dx equals f x y

Machine f x y outputs a slope

Initial condition y at x0 equals y0

Step size h and next point x1 y1

Integral sums tiny rises

Two slopes k1 and k2 predictor

Heun method average of slopes


Equipment checklist

Test yourself — cover the right side.

What does measure and what does measure?
= position along the road; = height above ground at that position.
What does the machine output?
A single number — the slope of the path at position , height .
Define slope in plain words.
Rise over run — how much you go up when you step a tiny bit to the right.
What does slope look like on the curve?
The path is momentarily flat (a peak, valley, or plateau).
What does mean and how does it relate to ?
They are the same thing — the slope of at one exact point.
Read in words.
The path's slope must equal whatever number the rule gives at the current spot.
Why do we need the initial condition ?
The slope rule alone allows infinitely many parallel curves; the anchor picks the one true path.
What are ?
Start position, start height, next position , and the step size (horizontal jump).
What does compute?
The total change in height over the step — the sum of all tiny rises.
What is and why is it "provisional"?
A cheap Euler guess of the end height, made only to read the end-slope; it is discarded after correcting.
What are and ?
The slope at the start and the slope at the predicted end; Heun walks using their average.

Connections

  • Euler's Method — builds the predictor step and the left-rectangle idea of §6.
  • Trapezoidal Rule — the "average both ends" integral shortcut of §6–§7.
  • Order of Accuracy and Step Size — what the step size trades off.
  • Predictor-Corrector Methods — where come together.
  • Runge-Kutta Methods — Heun as the two-slope RK2.
  • Taylor Series Methods — how the derivative expansions certify accuracy.