Finite differences

A table of readings — voltage every second, population every decade, a rocket's altitude every tenth of a second — has no formula attached to it, so ordinary calculus cannot differentiate or integrate it. Finite differences fix this by replacing the derivative with a discrete cousin built purely from subtraction: take the next tabulated value, subtract the current one, and repeat on the results. Three operators do the bookkeeping — forward Δ\Delta, backward ∇\nabla, and central δ\delta — together with a shift operator EE that ties them into one clean algebra. This machinery, organized into a difference table, is the entry point to the whole numerical-analysis block of MA10002: interpolation, numerical differentiation, and numerical integration all start by building exactly this table.

The core insight

The forward difference operator Δfi=fi+1−fi\Delta f_i = f_{i+1}-f_i (with ∇\nabla and δ\delta as its backward and central cousins, all tied together by the shift operator E=1+ΔE=1+\Delta) turns a table of function values into a difference table whose nn-th column is constant precisely when the underlying data is a degree-nn polynomial.

The core idea

Let ff be tabulated at equally spaced points xi=x0+ihx_i = x_0 + ih with common spacing hh, and write fi=f(xi)f_i = f(x_i). Three difference operators are defined directly on this table.

Forward difference:

Δfi=fi+1−fi\Delta f_i = f_{i+1} - f_i

where: the difference looks ahead, using the current row and the one below it.

Backward difference:

∇fi=fi−fi−1\nabla f_i = f_i - f_{i-1}

where: the difference looks behind, using the current row and the one above it; numerically ∇fi+1=Δfi\nabla f_{i+1} = \Delta f_i, but the two are indexed differently.

Central difference:

δfi=fi+1/2−fi−1/2\delta f_i = f_{i+1/2} - f_{i-1/2}

where: the difference straddles xix_i symmetrically, which is why central differences give the best accuracy for a given spacing hh.

Shift operator: Efi=fi+1Ef_i = f_{i+1}, so applying EE moves one row down the table. It links all three difference operators algebraically:

E=1+Δ,Δ=E−1,∇=1−E−1E = 1 + \Delta, \qquad \Delta = E - 1, \qquad \nabla = 1 - E^{-1}

where: these are operator identities — E2f0E^2 f_0 means "shift two rows," i.e. f2f_2, not "square f0f_0." Repeated application gives higher differences: Δ2fi=Δ(Δfi)=fi+2−2fi+1+fi\Delta^2 f_i = \Delta(\Delta f_i) = f_{i+2} - 2f_{i+1} + f_i, and in general Δnfi\Delta^n f_i expands as a signed sum of n+1n+1 tabulated values (derived below). A forward difference table lays f0,f1,f2,…f_0, f_1, f_2,\dots in the first column, then Δfi\Delta f_i, Δ2fi\Delta^2 f_i, Δ3fi,…\Delta^3 f_i,\dots in successive columns, each entry equal to the difference of the two entries diagonally to its left. The single most useful fact about such a table: if ff is a polynomial of exact degree nn, its nn-th difference column is constant and every later column is zero — an instant check on tabulated data, and the reason finite differences are the natural language for interpolating polynomials through data points.

Figure
A forward difference table with five function values in the first column and three columns of successive differences fanning out diagonally to the right
Forward difference table: each entry is the row below minus the row above, one column left x f Δf Δ²f Δ³f 01 12 29 328 465 1 7 19 37 6 12 18 6 6 Third column is constant — the data is an exact cubic in x
Derivation AExpanding Δⁿ via the shift operator

Show that the nn-th forward difference of a tabulated function can be written directly as a signed sum of n+1n+1 function values, Δnf0=∑k=0n(−1)k(nk)fn−k\Delta^n f_0 = \sum_{k=0}^{n} (-1)^k \binom{n}{k} f_{n-k}, using nothing more than the operator identity Δ=E−1\Delta = E-1 and the ordinary binomial theorem applied formally to operators.

Step 1. Start from the operator identity Δ=E−1\Delta = E - 1, where EE is the shift operator satisfying Efi=fi+1Ef_i = f_{i+1} and, by repeated shifting, Ekfi=fi+kE^k f_i = f_{i+k}.

Step 2. Raise both sides to the nn-th power, treating EE and 11 as if they were ordinary numbers for the purpose of algebraic expansion — this is legitimate because EE and the identity operator commute and combine linearly, exactly like real numbers, even though EE itself acts on functions:

Δn=(E−1)n=∑k=0n(nk)En−k(−1)k\Delta^n = (E-1)^n = \sum_{k=0}^{n} \binom{n}{k} E^{n-k}(-1)^k

Step 3. Apply both sides to f0f_0. On the right, each term En−kf0E^{n-k}f_0 shifts n−kn-k steps forward, so En−kf0=fn−kE^{n-k}f_0 = f_{n-k}:

Δnf0=∑k=0n(−1)k(nk)fn−k\Delta^n f_0 = \sum_{k=0}^{n} (-1)^k \binom{n}{k} f_{n-k}

Step 4. Check the formula against a case already known directly. For n=2n=2: Δ2f0=f2−2f1+f0\Delta^2 f_0 = f_2 - 2f_1 + f_0, which matches the direct definition Δ2f0=Δf1−Δf0=(f2−f1)−(f1−f0)\Delta^2 f_0 = \Delta f_1 - \Delta f_0 = (f_2-f_1)-(f_1-f_0). The formula reproduces the by-hand result, confirming the binomial expansion is valid and, crucially, that Δnf0\Delta^n f_0 can always be computed in one line from the raw table without building any intermediate difference columns.

Worked example

Reuse the table from the core idea, f(x)f(x) at x=0,1,2,3,4x=0,1,2,3,4 giving values 1,2,9,28,651,2,9,28,65 with spacing h=1h=1, and check the nn-th difference formula against the table built by hand.

Step 1. Build the table by direct subtraction (shown in the figure above): first differences 1,7,19,371,7,19,37; second differences 6,12,186,12,18; third differences 6,66,6; fourth difference 6−6=06-6=0. Because the third-difference column is constant and the fourth vanishes, f(x)f(x) is exactly a cubic — indeed f(x)=x3+1f(x)=x^3+1 reproduces every entry.

Step 2. Compute Δ3f0\Delta^3 f_0 using the Step 3 formula from the derivation, with n=3n=3: Δ3f0=∑k=03(−1)k(3k)f3−k=f3−3f2+3f1−f0\Delta^3 f_0 = \sum_{k=0}^{3}(-1)^k\binom{3}{k}f_{3-k} = f_3 - 3f_2 + 3f_1 - f_0.

Step 3. Substitute the table values f0=1f_0=1, f1=2f_1=2, f2=9f_2=9, f3=28f_3=28: Δ3f0=28−3(9)+3(2)−1=28−27+6−1=6\Delta^3 f_0 = 28 - 3(9) + 3(2) - 1 = 28-27+6-1=6. This matches the value found by hand in Step 1 — the operator shortcut needs no intermediate columns at all.

Step 4. Since the third differences are constant at 66, the next one, Δ3f1\Delta^3 f_1, must also equal 66. Use Δ2f2=Δ2f1+Δ3f1\Delta^2 f_2 = \Delta^2 f_1 + \Delta^3 f_1 to predict the missing entry that would appear if the table were extended: Δ2f2=18\Delta^2 f_2 = 18 (already known), so Δ3f1=18−12=6\Delta^3 f_1 = 18 - 12 = 6, consistent with a genuine cubic and letting us extend the table to x=5x=5 with confidence: Δ2f3=18+6=24\Delta^2 f_3 = 18+6=24, Δf4=37+24=61\Delta f_4 = 37+24=61, so f5=65+61=126f_5 = 65+61=\mathbf{126}, matching f(x)=x3+1f(x)=x^3+1 at x=5x=5 exactly (53+1=1265^3+1=126).

Final answer: Δ3f0=6\Delta^3 f_0 = 6, and the same constant-third-difference pattern predicts f(5)=126f(5)=126.

Common traps

  • Confusing Δfi\Delta f_i (uses fi+1,fif_{i+1},f_i) with ∇fi\nabla f_i (uses fi,fi−1f_i, f_{i-1}) — numerically related by ∇fi+1=Δfi\nabla f_{i+1}=\Delta f_i, but indexed differently, so mixing them shifts every later formula by one row.
  • Treating the operator relations E=1+ΔE=1+\Delta, Δ=E−1\Delta=E-1 as ordinary arithmetic on numbers rather than as formal algebra on operators — E3E^3 means "shift three rows," never "cube the value."
  • Assuming the constant-nn-th-difference test proves a polynomial of exact degree nn whenever the differences merely look constant — real measured data with rounding error will show differences that wobble near zero rather than vanish cleanly.
  • Applying Δ\Delta, ∇\nabla, or δ\delta to unequally spaced data — all three assume a single constant spacing hh; irregular spacing needs divided differences, which is outside this course's scope.

Ask the tutor: if the (E−1)n(E-1)^n binomial expansion or the difference-table construction still feels shaky, ask the AI tutor to walk through building the table for a different data set or to explain how Δ\Delta, ∇\nabla, and δ\delta relate on the very same row.

Why do we need three different difference operators instead of just one

Forward, backward, and central differences all measure the same underlying discrete rate of change but use different neighbouring rows, which matters at the edges of a table and for accuracy. Forward differences are natural near the start of a table (no earlier row exists), backward differences near the end, and central differences — being symmetric about xix_i — are the most accurate for interior points, which is why later interpolation formulae pick whichever operator fits the position in the table.

Is the shift operator E just a notational trick, or does it do real work

It does real work: writing Δ=E−1\Delta=E-1 turns "build a difference table row by row" into ordinary polynomial algebra on EE. Once Δn\Delta^n is expanded as (E−1)n(E-1)^n via the binomial theorem, you can read off Δnf0\Delta^n f_0 as a single sum of function values without constructing any intermediate columns — exactly what the derivation above does. That algebraic shortcut is why EE earns its own name rather than being folded silently into Δ\Delta.

Why does the spacing h have to be constant for these formulas to work

Every definition here — Δfi=fi+1−fi\Delta f_i = f_{i+1}-f_i, and likewise for ∇\nabla and δ\delta — implicitly assumes each step from xix_i to xi+1x_{i+1} covers the same distance hh, which is what lets you line differences up in clean columns and lets the operator algebra (E=1+ΔE=1+\Delta and so on) hold exactly. If the spacing varies, EE no longer means "shift by a fixed amount," so the whole operator toolkit breaks down; unequally spaced tables instead need divided differences, a related but separate construction.

Before this

Where this leads