Someone argues: "The truncation error of the central difference is

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics

Mathematical Methods for Physics, Ch Root finding, interpolation, numerical linear algebra and quadrature

Problem

Someone argues: "The truncation error of the central difference D(h)=f(x+h)−f(x−h)2hD(h) = \dfrac{f(x+h)-f(x-h)}{2h} is h26∣f′′′(x)∣\dfrac{h^2}{6}|f'''(x)|, which shrinks as h→0h\to0, so a very small step such as h=10−10h = 10^{-10} must give the most accurate estimate of f′(x)f'(x)." Take f(x)=cos⁡xf(x) = \cos x at x=2 radx = 2\,\mathrm{rad}, where f(2)=−0.416147f(2) = -0.416147 and f′′′(2)=sin⁡2=0.909297f'''(2) = \sin 2 = 0.909297, and machine epsilon ϵM=2.2×10−16\epsilon_{\mathrm{M}} = 2.2\times10^{-16}. ((a)) Find the error in the reasoning by estimating the total error (truncation plus rounding) of D(h)D(h) at h=10−10h = 10^{-10}. ((b)) Find the step h∗h_* that minimises the total error, and the resulting best error, and compare both with part (a).

Browse the problem library