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 sample decays as N(t)=N0e−5t, with N0=1 (a dimensionless fraction of the initial number of nuclei) and t in seconds, and its instantaneous decay rate at t=0 is estimated by the forward-difference formula, using ϵmach=2.220446×10−16.
(a) Using hopt≈2ϵmach∣f/f′′∣, predict, before looking at any table, the decade of h at which the forward-difference error should be smallest.
(b) A one-decade-per-row run, in binary64, recorded the following errors of the forward-difference estimate against the exact derivative at t=0:
h=10−6s: 1.2×10−5; h=10−7s: 1.3×10−6; h=10−8s: 1.3×10−7; h=10−9s: 3.0×10−8; h=10−10s: 4.1×10−7; h=10−11s: 4.1×10−7.
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.