5.2 Extrapolated difference
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §5.2. Rewritten in original wording. Continues 5.1 Differentiation. Labs: 5.2b Extrapolated-difference labs.
Extrapolating the error away
A differentiation rule that keeps a finite Taylor chunk also predicts the leading leftover. Combine two central approximations so those leftovers cancel — Richardson extrapolation. Walk , , and — pick the matching equation at each step.
Caveat: high-order stencils on noisy data amplify noise. Smooth or fit first (Chapter 6), then differentiate.
Second derivatives (force from )
Newton: . From a measured , approximate by nesting central differences (the guide after the reference one-liners walks that stencil).
The compact form is neat but may worsen cancellation by forming the large sum before subtracting . Second derivatives need larger optimal than first derivatives: round-off scales roughly like .
Truncation vs round-off (recap with numbers)
From Chapter 3, the sweet spot is where . Rough models:
Equating and taking with suggests and , with central error orders of magnitude smaller — the “better” method optimally uses a larger .
On a vs plot: large → algorithmic slope ( for fd, for cd, for ed); tiny → round-off rising as falls.
Reference one-liners
FD = (y(t+h) − y(t)) / h
CD = (y(t+h/2) − y(t−h/2)) / h
ED = (8(y(t+h/4)−y(t−h/4)) − (y(t+h/2)−y(t−h/2))) / (3h)
D2 = (y(t+h) − 2y(t) + y(t−h)) / h²
Quick check of and the stencil — pick the matching equation at each step.
Extrapolation and y″
1 / 3D_ed = (4 D_cd(h/2) − D_cd(h))/3 is built to…
Pick an answer to see if you are right.
Next: 5.2b Extrapolated-difference labs. Then 5.3 Integration.