(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 ff on each subinterval [xj,xj+h][x_j, x_j+h] of a partition of [a,b][a,b] into NN equal panels of width h=(b−a)/Nh=(b-a)/N, derive the composite trapezium rule TN=h[12f(x0)+f(x1)+…+f(xN−1)+12f(xN)]T_N = h\left[\tfrac{1}{2}f(x_0) + f(x_1) + \ldots + f(x_{N-1}) + \tfrac{1}{2}f(x_N)\right] and state, without re-deriving it term by term, that its leading error is TN−I≈112(b−a)h2f′′‾T_N - I \approx \tfrac{1}{12}(b-a)h^2\overline{f''}, where f′′‾\overline{f''} is a mean value of f′′f'' on [a,b][a,b]. (b) The integral I=∫01xe−x dxI=\int_0^1 x e^{-x}\,\mathrm{d}x has the exact value I=1−2e−1=0.2642411I = 1 - 2e^{-1} = 0.2642411. Compute T4T_4 and T8T_8 (using h=0.25h=0.25 and h=0.125h=0.125), find the two errors, and show their ratio is close to the value the order derived in part (a) predicts.

Browse the problem library