(a) By fitting a straight line to on each subinterval of a partition of into equal…
PHYSICS · Subjective · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics
Computational Physics, Ch Differentiating and integrating numbers
Problem
(a) By fitting a straight line to f on each subinterval [xj,xj+h] of a partition of [a,b] into N equal panels of width h=(b−a)/N, derive the composite trapezium rule TN=h[21f(x0)+f(x1)+…+f(xN−1)+21f(xN)] and state, without re-deriving it term by term, that its leading error is TN−I≈121(b−a)h2f′′, where f′′ is a mean value of f′′ on [a,b].
(b) The integral I=∫01xe−xdx has the exact value I=1−2e−1=0.2642411. Compute T4 and T8 (using h=0.25 and h=0.125), find the two errors, and show their ratio is close to the value the order derived in part (a) predicts.