Visual walkthrough — Polynomial interpolation — Lagrange form, Newton's divided differences
Everything below refers to the same three dots. Let me name them once, in plain words, so no symbol sneaks in undefined.
Step 1 — The goal, drawn
WHAT. We want one smooth curve — a polynomial — that touches all three dots exactly.
A polynomial is just a curve built from powers of added together, like . Its degree is the highest power. Three dots can be pinned by a degree- (parabola-shaped) curve, because a degree- polynomial has three knobs to turn: , , .
WHY degree for dots. Count the knobs against the demands:
Three knobs, three demands → exactly enough to lock the curve. (In general: dots need degree .)
PICTURE. The three dots and the (spoiler) curve we are going to construct.
Step 2 — The Lagrange idea: a "switch" for each dot
WHAT. Instead of solving for directly, we build one small curve per dot that is a switch: it equals at its own dot and at every other dot. Call the switch for dot the symbol .
WHY a switch helps. If I have three switches , then scaling each by its dot's height and adding gives
- — the height of dot (a fixed number).
- — the switch for dot (on only at ).
At node , for example, and , so the whole sum collapses to . The curve is forced through the dot with no algebra to solve.
PICTURE. The three switch-curves, each spiking to at its own node, flat-zero at the others.
Recall Why switches don't interfere
Because each is zero at every node except its own, adding them cannot disturb a height already set. Each term only "speaks" at its own dot.
Step 3 — Building one switch, factor by factor
WHAT. Let's construct — the switch for dot 0 (node ).
WHY start with the zeros. A switch for dot 0 must be zero at the other nodes and . The cleanest way to force a curve to be zero somewhere is to multiply in a factor that vanishes there:
- — a factor that equals exactly at (node 1).
- — a factor that equals exactly at (node 2).
This already vanishes at the right places. But at its own node it gives , not . So we divide by that value to normalise the switch to :
- The top kills the curve at the other nodes.
- The bottom is a fixed number that resets the height to at .
PICTURE. Watch get built: the raw product (zeros in the right spots), then the vertical rescale so the peak sits at height .
Step 4 — Stacking the switches into the curve
WHAT. Now add all three switches, each weighted by its dot's height:
WHY it must pass through every dot. Evaluate at node : only is on (), the other two are off (), so . Same story at each node.
PICTURE. The scaled switches (heights , , ) and their sum — the red curve threading all three dots.
Expanding this sum gives (we verify below). That is the one interpolating polynomial.
Step 5 — Newton's idea: build the SAME curve by nudges
WHAT. Lagrange rebuilds everything if you add a dot. Newton instead grows the curve one correction at a time, and each correction is designed to not disturb what's already fixed.
WHY it works. Start at dot 0. Add a term to also hit dot 1. Then add a term that is zero at dots 0 and 1 so it can fix dot 2 without breaking them:
- — vanishes at dot 0, so the second term leaves dot 0 untouched.
- — vanishes at dots 0 and 1, so the third term leaves both untouched.
Each new factor "protects" all earlier dots.
PICTURE. Three snapshots: the flat start at height , the tilted line through dots 0–1, then the bent curve catching dot 2 — the earlier dots never move.
Step 6 — Where the Newton coefficients come from (slopes of slopes)
WHAT. The numbers are divided differences — literally slopes, then slopes of slopes.
WHY slopes. To move from dot 0 to dot 1, the right steepness is the ordinary secant slope . To bend correctly for dot 2, we need how that slope itself changes.
- — just the starting height ().
- — the secant slope between dots 0 and 1 ().
- — the "slope of the slopes" (), i.e. how much the steepness bends.
So
PICTURE. The divided-difference triangle, with arrows showing each number is the difference of the two to its left, divided by the span of its outer nodes. The final coefficient is highlighted.
Recall Check dot 2
. ✔
Step 7 — Two recipes, one curve
WHAT. Expand Newton's form: which is exactly the Lagrange result from Step 4.
WHY they must match. There is only one degree- polynomial through three dots (Step 1's knob-count, proven via the Vandermonde matrix). Two correct recipes cannot produce two different such curves — so they coincide.
PICTURE. Both constructions overlaid; the curves lie on top of each other, one red.
Step 8 — The degenerate & edge cases you must see
WHAT. Three scenarios the recipe must survive:
- Collinear dots. If the three dots lie on a line, the knob and the second divided difference are both , so collapses to a line — degree drops below . Nothing breaks.
- Repeated node (). A denominator appears — division by zero. This is forbidden: distinct nodes are required. Two heights at one spot is not a function.
- Ends of the interval. Even a perfect fit at the nodes can wander between them. The error carries the factor , which grows near the outer edges — the seed of the Runge phenomenon.
WHY show these. The recipe is only trustworthy if you know exactly when it succeeds, collapses, or is illegal.
- — zero at the nodes, large between/beyond them.
- — how curvy the true function is; if it's wild, error is wild.
PICTURE. Left: collinear dots giving a line. Middle: the illegal repeated node (a vertical clash). Right: the error product swelling at the ends.
The one-picture summary
Everything on one canvas: the three dots, the three Lagrange switches (faint), Newton's nudging path (dashed), and the single red interpolant they all agree on — with the error product hinted at the edges.
Recall Feynman retelling — the whole walkthrough in plain words
You've got three dots and want one bendy line through all of them. Because a parabola has three dials () and you have three demands, there's exactly one such curve.
Lagrange's way: for each dot, make a little "switch" curve that's on (height 1) at that dot and off (height 0) at the others. You force a switch to be off somewhere by multiplying in a factor that dies there; you force it on at its own dot by dividing by whatever value it currently has. Then scale each switch by its dot's height and add them. Since every switch is silent at the other dots, the sum sails through all three.
Newton's way: start flat at the first dot. Tilt to catch the second — using the plain slope between them. Then bend to catch the third — using the "slope of the slopes" — and multiply that correction by so it's zero at the first two dots and can't ruin them. The numbers you need are just differences divided by gaps, read off a little triangle.
Both recipes draw the same red curve — there's only one — they just bookkeep differently. And beware: nodes must be different (or you divide by zero), and the fit can wobble at the edges even when it's perfect on the dots.
Connections
- Parent topic
- Vandermonde matrix — why the three knobs are uniquely fixed.
- Runge phenomenon — the edge-wobble made real.
- Chebyshev nodes — node spacing that tames the error product.
- Cubic splines — many small curves instead of one big one.
- Numerical differentiation — differentiate for slopes.
- Newton-Cotes quadrature — integrate for areas.
- Taylor series — divided differences → derivatives as nodes coalesce.