PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics
Error, Chance and the Machine, Ch Approximating a function: interpolation and differentiation
Problem
A record has a dropped sample, so around the point x0 only the values f(x0−h), f(x0) and f(x0+2h) are available. We want weights c−1,c0,c2 in f′(x0)≈c−1f(x0−h)+c0f(x0)+c2f(x0+2h).
((a)) Derive the weights by requiring the formula to be exact for 1, x−x0 and (x−x0)2.
((b)) Show that (x−x0)3 is the first power the formula fails on, and find the leading error, formula minus f′(x0), in terms of h and f′′′(x0).
((c)) For f=sin, x0=1 and h=0.1, compare the leading error with the error computed directly from the three sine values.