A forward-difference estimate of the derivative of (with in radians) is required at

PHYSICS · Subjective · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics

Computational Physics, Ch Numbers a machine can hold, and the two errors that follow

Problem

A forward-difference estimate of the derivative of f(x)=sin⁡(100x)f(x) = \sin(100x) (with xx in radians) is required at x=0.01 radx = 0.01\,\mathrm{rad}, using ϵmach=2.220446×10−16\epsilon_{\rm mach} = 2.220446\times10^{-16}. (a) Using hopt≈2ϵmach∣f/f′′∣h_{\rm opt} \approx 2\sqrt{\epsilon_{\rm mach}|f/f''|}, predict, before looking at any table, the decade of hh at which the forward-difference error should be smallest. (b) A one-decade-per-row run at x=0.01 radx=0.01\,\mathrm{rad}, in binary64, recorded the following errors of the forward-difference estimate against the exact derivative: h=10−7h=10^{-7}: 4.2×10−44.2\times10^{-4}; h=10−8h=10^{-8}: 4.2×10−54.2\times10^{-5}; h=10−9h=10^{-9}: 4.2×10−64.2\times10^{-6}; h=10−10h=10^{-10}: 1.4×10−61.4\times10^{-6}; h=10−11h=10^{-11}: 5.3×10−65.3\times10^{-6}; h=10−12h=10^{-12}: 5.8×10−65.8\times10^{-6}. State which row turns over, and say whether it agrees with the prediction of part (a) to the precision that an order-of-magnitude argument can support.

Browse the problem library