PHYSICS · Subjective · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists
Computational Physics, Ch Letting the computer do the algebra
Problem
The central-difference approximation to f′(x) is Dhf(x)=2hf(x+h)−f(x−h). Take f(x)=lnx.
(a) Expand f(x+h) and f(x−h) as Taylor series in h about x, keeping every term up to and including the one in h3, and combine the two series to show that Dhf(x)−f′(x)=61h2f′′′(x)+O(h4).
(b) Given f′′′(x)=2/x3, evaluate the coefficient of h2 in the error at x=2.
(c) A ratio table built by halving h for f(x)=lnx at x=2 gives a measured coefficient (the number multiplying h2 in the error) of 0.0417. State whether the symbolic result agrees, and to how many figures.