Intuition The one core idea
To follow a curved path forward, don't trust the direction it points right now — peek at where it will point at the end of your step, then walk using the average of those two directions. Everything in Modified Euler (Heun's method) is just this "average two slopes" idea dressed in symbols.
This page assumes you have seen nothing . Before we can even read d x d y = f ( x , y ) , 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.
x and y — where and how high
Think of walking left-to-right along a flat road. Your position along the road is == x == (how far along). How high above the ground you are is == y == (your height). A single moment is a point ( x , y ) : "at distance x , I am at height y ."
Look at Figure 1. The horizontal chalk line is the x -axis (distance travelled). The vertical chalk line is the y -axis (height). A curve is just the record of your height at every position — a path .
f ( x , y ) — a rule that spits out a slope
f is a machine : you feed it your current position x and current height y , and it hands you back a single number. In our topic that number is a slope — how steeply the path is rising or falling right where you stand. We write f ( 0 , 1 ) = 1 to mean "at x = 0 , height 1 , the rule says the slope is 1 ."
Why does the topic need f ( x , y ) and not just f ( x ) ? 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.
Definition Slope — "rise over run"
Slope answers: if I step a tiny bit to the right, how much do I go up? If moving right by 1 raises you by 2 , the slope is 2 . If moving right by 1 drops you by 0.4 , the slope is − 0.4 (negative = going downhill).
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 = run rise .
Intuition Why "slope" is the whole game
Numerical methods build a curve step by step , and the only information they have at each step is the slope. A big positive slope means "climb steeply next"; zero slope means "stay flat for now"; negative means "descend." If you can read a slope, you can predict the next tiny piece of the path.
Sign cases you must recognise:
Slope > 0 → curve rising (uphill).
Slope = 0 → curve momentarily flat (a peak, valley, or plateau).
Slope < 0 → curve falling (downhill).
In Example 2 of the parent, the start slope was f ( 0 , 1 ) = 0 — exactly zero , meaning the curve leaves the start flat before bending down. That is the "slope = 0 " case in the flesh.
d x d y — the slope at a single instant
"d " means "a tiny bit of." So d y is a tiny change in height and d x is a tiny change in position. Their ratio d x d y is rise-over-run shrunk down to a single point — the slope of the path exactly where you stand.
y ′ — shorthand for the same thing
== y ′ == (read "y-prime") is just a shorter way to write d x d y . Both mean "the slope of y ." So y ′ = f ( x , y ) reads: "the slope of the path equals whatever the rule f says at my current spot." That single line is the problem the whole chapter solves.
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.
d x d y as a fraction you can "cancel"
Why it feels right: it looks like b a .
The fix: treat it as one symbol meaning "instantaneous slope." d y and d x are not ordinary numbers you split apart here.
d x d y = f ( x , y ) — a slope rule you must obey
This says: at every point, my path's slope must equal the number the machine f gives. It does not tell you the height directly — only the direction to head at each spot. Your job is to reconstruct the height everywhere from the slope rule.
Intuition Why one slope rule isn't enough — you need a starting height
Infinitely many paths have the same slope rule; they are parallel copies shifted up and down. To pin down one path you must be told a single anchor: one ( x , y ) you definitely pass through. That anchor is the initial condition .
y ( x 0 ) = y 0 — the starting anchor
== x 0 == is where we start (subscript "0" = "the zeroth / very first point"). == y 0 == is the known height there. So y ( x 0 ) = y 0 reads "at position x 0 the height is exactly y 0 ." In Example 1, x 0 = 0 and y 0 = 1 : we start at the point ( 0 , 1 ) .
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.
h — how big a step we take
== h == is the horizontal distance we jump each step: x goes from x 0 to x 0 + h . Small h = careful baby steps (more accurate, slower); big h = bold strides (faster, rougher). In Example 1, h = 0.1 .
x 1 and y 1 — the end of one step
== x 1 === x 0 + h is the position after one step (subscript "1" = "the first new point"). == y 1 == is the height we're trying to find there. The entire method is a recipe for a good y 1 .
∫ x 0 x 1 f d x — the total rise over the step
The stretched "S" (∫ ) means sum . It adds up all the tiny rises (slope × tiny run) from x 0 to x 1 . The result is the total change in height across the step. This is why the parent writes
y ( x 1 ) − y ( x 0 ) = ∫ x 0 x 1 f ( x , y ) d x .
In words: (height at end) minus (height at start) = sum of all the little rises in between. That is exact — no approximation yet.
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).
k 1 and k 2 — two slope readings
== k 1 == is the slope at the start : k 1 = f ( x 0 , y 0 ) . == k 2 == is the slope at the predicted end : k 2 = f ( x 1 , y 0 + h k 1 ) . They are just two numbers you read off the machine f at two places.
y 1 ( p ) — the "practice step" guess
The little superscript ( p ) means predicted — a rough draft. y 1 ( p ) = y 0 + h k 1 is a cheap first guess of the end height, made only so we can read the end-slope k 2 there. It is discarded once the real y 1 is computed.
Intuition Why two slopes and an average
The start-slope k 1 knows only the beginning; the true path bends, so k 1 alone drifts off. Reading k 2 at the (guessed) end lets us split the difference: the average 2 1 ( k 1 + k 2 ) tracks the curve far better than either end alone. That average, multiplied by the step h , is the trapezoid estimate of the integral in §6.
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
Two slopes k1 and k2 predictor
Heun method average of slopes
Test yourself — cover the right side.
What does x measure and what does y measure? x = position along the road; y = height above ground at that position.
What does the machine f ( x , y ) output? A single number — the slope of the path at position x , height y .
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 = 0 look like on the curve? The path is momentarily flat (a peak, valley, or plateau).
What does y ′ mean and how does it relate to d x d y ? They are the same thing — the slope of y at one exact point.
Read d x d y = f ( x , y ) in words. The path's slope must equal whatever number the rule f gives at the current spot.
Why do we need the initial condition y ( x 0 ) = y 0 ? The slope rule alone allows infinitely many parallel curves; the anchor picks the one true path.
What are x 0 , y 0 , x 1 , h ? Start position, start height, next position = x 0 + h , and the step size (horizontal jump).
What does ∫ x 0 x 1 f d x compute? The total change in height over the step — the sum of all tiny rises.
What is y 1 ( p ) 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 k 1 and k 2 ? The slope at the start and the slope at the predicted end; Heun walks using their average.
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 h trades off.
Predictor-Corrector Methods — where k 1 , k 2 , y 1 ( p ) come together.
Runge-Kutta Methods — Heun as the two-slope RK2.
Taylor Series Methods — how the derivative expansions certify accuracy.