Exercise 17.3#
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 the value of the integral using the composite Simpsons rule.
Calculate the values for \(n = 1, 2, \dots, 10\) sub-intervals and compare the approximations to the exact value by plotting the value of the integral versus \(n\). Be sure to represent the exact solution in the plot as well.