A ball is thrown vertically so that its height obeys
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 ball is thrown vertically so that its height obeys y(t)=v0t−21gt2, with v0=20.0ms−1 and g=9.80ms−2 (air resistance ignored). Someone estimates the instantaneous velocity at t=1.00s using the forward-difference formula [y(t+h)−y(t)]/h in place of the true derivative y′(t).
(a) State the binary64 layout (sign, exponent and stored significand bits) and use it to derive ϵmach=2−52.
(b) Expand y(t+h) as a Taylor series about t and derive the leading truncation-error term of the forward difference, as a function of h and y′′(t).
(c) Say why, for this particular y(t), that leading term is in fact the entire truncation error, with nothing left over.
(d) Evaluate the truncation error at h=0.100s and at h=0.0500s, and give the ratio of the two errors.