Foundations — Adaptive step-size — RK45, error control
This page is the toolbox. Before you can read the parent note, you must own every symbol it throws at you. We build each one from nothing — plain words, then a picture, then why the topic needs it — in an order where each tool rests on the previous.
1. What a differential equation even says
So is a sentence: "At every point , here is the direction to head." It does not hand you the curve; it hands you an arrow at every point, and you must walk along the arrows to trace the curve.

Why the topic needs this. RK45 is a machine for walking along those arrows accurately. Every symbol later (, , ) is about taking one good step in the arrow field. If you don't see the field, nothing else lands.
Recall Check: what does
give you? returns... ::: the slope (steepness) of the solution at the point — not the solution itself.
2. The step size — the length of one hop
Why "little"? The arrow field can bend. If you follow one straight arrow for a huge distance you drift off the true curve. A short hop stays close to the truth — but short hops are slow. This tug-of-war (accuracy vs speed) is the entire reason adaptive methods exist.

3. The slope samples — peeking before you leap
A crude method uses one slope (the arrow at the start) for the whole hop. A Runge–Kutta method is smarter: it peeks at several arrows inside the interval and blends them.
The Greek (sigma) just means add them all up: up to the sample before .

Why the topic needs . These samples are the expensive part — every is a call to . The whole "free error estimate" trick works precisely because RK45 reuses the same for two different answers. You cannot appreciate "free" until you know is what costs money.
Recall Check: why is
and not ? Because each slope sample is built from the ones already computed — an explicit chain, so a sample never depends on itself.
4. Weighted sums — blending the peeks into one answer
Once you have all the peeked slopes (there are of them), you combine them into a single "effective slope" using weights , then take the hop:
Why a weighted average and not just the first arrow? Averaging several arrows across the step cancels out the curving error much better — this is what makes RK "high order" instead of crude. The exact come from Dormand–Prince (RK45 used by scipy solve_ivp).
5. The second weight row — two answers from ONE set of peeks
Here is the piece the whole topic pivots on, so we build it slowly.
You have the peeked slopes . To finish a step you blend them with a weight row . But nothing forces you to use only one weight row. The very same slopes can be blended a second time with a different set of weights, which we write (read "b-i-star" — a second, separate list of blend numbers).

Why the topic needs . Without a second weight row you would have to run a whole separate method (fresh, expensive ) just to estimate error. The star-row is the trick that makes RK45 cheap: same peeks, second blend, instant error ruler.
Recall Check: what is different between
and ? Only the weight row: vs — the slope samples are identical, which is why the estimate is nearly free.
6. Order — how fast the error shrinks
Reading . RK45 controls the step off the order-4 answer , so and the exponent is . Halving then shrinks the error by times. That steep power is why small steps buy so much accuracy, and why the update formula uses a fifth root.

This power law comes straight from Taylor Series Expansion: the first term the method fails to cancel is proportional to . See Order of a Numerical Method and Local vs Global Truncation Error for where is pinned down.
7. The error estimate — one number saying "how wrong"
Because (order 5) is far more accurate than (order 4), their gap is essentially the whole error of the weaker one — a free ruler, exactly as pictured in Section 5.
8. Tolerance — the error budget you allow
Why both? If becomes huge, a tiny fixed becomes an impossible demand; the term rescues you by scaling the budget. If passes through zero, keeps the budget from collapsing to nothing. The accept/reject decision is simply the comparison .
Recall Check: why not use
alone? Because when grows large a fixed absolute floor is impossibly strict — the relative term lets the budget scale with the solution.
9. Putting the symbols together — the vocabulary the topic assumes
| Symbol | Plain meaning | Picture |
|---|---|---|
| slope-recipe at every point | arrow field | |
| length of one hop in | horizontal gap | |
| where we currently stand | a dot on the curve | |
| -th peeked slope | small arrows inside the step | |
| higher-order (order 5) blend weights | recipe for the accurate average | |
| lower-order (order 4) blend weights, same | recipe for the second average | |
| the two answers from the two rows | two landing dots | |
| order (error shrink rate) | steepness of the error curve | |
| estimated step error | gap between the two answers | |
| error budget | the line you must stay under |
Everything in the parent's boxed formula is now a symbol you've built: a hop length, an error budget, an estimate (from two weight rows), and an order.
Prerequisite map
Equipment checklist
I can state what returns
I can say what is and the trade-off in choosing it
I know what and mean
I can read
I know what a slope sample is and why it's expensive
I can explain the difference between and
I can say what and are
I can explain why two answers give a free error estimate
I can explain what "order " measures
I know why the local exponent is , not
I can state what estimates and where it comes from
I can write and read
I can decide accept vs reject
Connections
- 4.8.25 Adaptive step-size — RK45, error control (Hinglish) — the parent topic these foundations feed.
- Runge–Kutta Methods (RK4) — where the stages and weights come from.
- Taylor Series Expansion — the origin of the error law.
- Order of a Numerical Method — pins down the in the exponent.
- Local vs Global Truncation Error — why per-step error is .
- Dormand–Prince (RK45 used by scipy solve_ivp) — the actual table.
- Stiff ODEs and Stability — when even adaptive explicit steps struggle.