Visual walkthrough — Boundary value problems — shooting method, finite difference
We will use a running example so the numbers stay concrete: whose true answer is the smooth curve .
Step 1 — A curve we cannot see all at once
WHAT. We have an unknown curve living on the interval . We know only its two endpoints: (the left height) and (the right height). Everything between is a mystery.
WHY. A computer cannot hold a whole continuous curve — infinitely many points. So we make a deal: instead of the whole curve, we only track its height at a finite list of evenly spaced places. Those places are our grid.
PICTURE. The blue curve is the true answer. The orange dots are the only things we will ever compute — the heights sitting on vertical grid lines a distance apart.

In our example . If we pick then and the interior mystery is a single dot at .
Step 2 — Why a derivative is a "rise over a tiny run"
WHAT. The equation talks about , and is built from , the slope. So before touching second derivatives we ask: how do we get a slope from just dots?
WHY tangent-lines, not something fancier. The slope is the steepness of the true curve at the dot. We cannot measure it directly — we only have neighbouring dots. So we approximate the steepness by the tilt of a straight line drawn between nearby dots: rise over run, . This is the only tool available when all you own is heights.
PICTURE. Three candidate lines through node : a line to the right neighbour (forward), a line to the left neighbour (backward), and a line joining the two neighbours straight across (central). Notice the central green line hugs the true tangent best — it is balanced on both sides.

Step 3 — Taylor series: the exact bookkeeping of a wobble
WHAT. Taylor series is a rule that writes a nearby height in terms of the height, slope, curvature… at one anchor point. We apply it to the two neighbours of node .
WHY this tool and not another. We need to know exactly how much error each straight-line guess carries. Taylor series is the one machine that expands as an infinite sum whose terms are labelled by which derivative they carry — so we can watch precisely which terms survive and which cancel.
PICTURE. Step outward from the anchor dot by (right neighbour) and by (left neighbour). Each colored bar is one Taylor term contributing to the neighbour's height.

Term-by-term. Each term is (some derivative of at the anchor) (the step raised to a power) (a factorial). Odd powers of flip sign when we step left; even powers do not. That single fact drives everything next.
Step 4 — Subtract to catch the slope
WHAT. Subtract the left expansion from the right one.
WHY. The two terms are equal, and every even term (, …) is identical in both — so subtracting kills them. Only the odd terms survive, and the first survivor carries exactly the slope we want.
PICTURE. The identical even bars annihilate (grey, crossed out); the odd bars double up. What remains is a clean multiple of the slope plus a tiny leftover.

Divide by and drop the leftover:
Step 5 — Add to catch the curvature
WHAT. Now add the two expansions instead.
WHY. Adding kills every odd term (they had opposite signs), leaving the even ones. The first even survivor is — precisely the second derivative the BVP needs.
PICTURE. The odd slope bars cancel (opposite arrows), the even bars stack to double height, and appears wearing an coat.

Move across and divide by :
Step 6 — Plug the stencils into the BVP and group
WHAT. Take the general linear BVP and replace and at node by the boxed stencils.
WHY. This turns a calculus equation (about a curve) into an algebra equation (about three neighbouring dots). We do it at every interior node, so the dots become tied together.
PICTURE. The substitution, then the collect-terms step, shown as three "weights" landing on the three neighbouring dots .

Substitute (, etc.):
Multiply through by and gather each dot:
Term-by-term.
- The on the left and on the right come only from the slope stencil — that is the "flow"/convection term. If the left and right weights differ: the stencil becomes asymmetric.
- The bare in the middle is the curvature's own signature — the famous "minus two in the middle".
- adjusts the centre weight for the term.
- is a pure known number (the forcing), so it lives on the right side.
Step 7 — Assemble the tridiagonal system
WHAT. Write the Step-6 equation for . Each row touches only three consecutive unknowns, so stacking the rows gives a matrix that is non-zero only on three diagonals.
WHY three diagonals. A node only ever talks to its immediate neighbours (the stencil spans ). So row has entries in columns and nowhere else — a tridiagonal matrix, solvable in .
PICTURE. The band matrix , the unknown column , and the right-hand side — with the boundary rows highlighted where the known and get subtracted across to .

Step 8 — Run the numbers (the degenerate one-node case)
WHAT. Our example has . Take the smallest non-trivial grid , so there is a single interior node at and .
WHY show the tiniest case. With one interior node the tridiagonal system collapses to a single equation — the whole machine on one line, nothing hidden.
PICTURE. The three dots , unknown , , and the single stencil equation balancing on .

The centre weight is ; both side weights are (since ): Move the knowns across:
Check. True . Error from just two intervals — and by Step 4/5 it falls like : refine to and the error should drop roughly fourfold.
The one-picture summary

The whole journey on one canvas: a smooth curve → sampled into dots → Taylor series subtract/add to birth the two stencils → substitute into the BVP → three weights per node → a tridiagonal band solved all at once.
Recall Feynman retelling — the walkthrough in plain words
We had a smooth invisible curve pinned down only at its two ends. First we agreed to only look at it at evenly spaced dots. To measure steepness with dots, we drew a line across a dot's two neighbours (balanced, so its errors cancel). To make "cancel" exact we used Taylor series — a recipe writing each neighbour's height as anchor + slope·step + curvature·step² + … . Subtracting the two neighbours wiped out the even terms and handed us the slope; adding them wiped out the odd terms and handed us the curvature (which just measures how far a dot dips below the line joining its neighbours). We poured those two recipes into the physics equation, turning calculus into three little weights sitting on three neighbouring dots. Because each dot only chats with its immediate neighbours, stacking all the equations made a slim three-stripe matrix we can solve in one sweep. We tested it on the smallest possible grid — one mystery dot — and got versus the true : close, and getting four times closer each time we double the number of dots.
Recall
What does subtracting the two Taylor expansions isolate, and why? ::: The slope — because the even-power terms are identical in both and cancel, leaving odd terms, the first of which is . What does adding them isolate? ::: The curvature — the odd-power terms have opposite signs and cancel, leaving . Why is the resulting matrix tridiagonal? ::: Each node's stencil only involves , so every row has non-zeros only on three diagonals. Where do the known boundary values go? ::: Subtracted across to the right-hand side in the first and last interior rows. In the example, what is ? ::: , versus true .