Exercise 18.5

Exercise 18.5#

Consider the integral

\[ \int_0^{0.9} \frac{dx}{1 - x^2} \]

which has the exact solution:

\[ \frac{1}{2}\ln\left(\frac{x + 1}{1 - x}\right)~~\Bigg|_{x = 0.9} \]

Approximate this integral using each of the midpoint, trapezoidal and Simpson’s rules with Richardson’s extrapolation for \(n = 1, 2, \dots, 10\) sub-intervals.

On separate axes for each of the methods, plot the following vs \(n\):

  • The true error of \(I_n(f)\)

  • The true error of \(I_{2n}(f)\)

  • The true error of \(I_n^{[1]}(f)\)

  • The upper-bound of the theoretical error from (18) / (20) / (22)

  • The error estimation from (27)

How do each of these compare?