Problem 206
Easy Further Applications

Calculate ln2=integral from 1 to ² dx/x with accuracy

Calculate $\ln2=\displaystyle\int_1^2\frac{dx}{x}$ with accuracy $0.001$ using (a) the rectangle (midpoint) method, (b) the trapezoidal method, (c) Simpson's method — determining in each case how many subintervals are needed.

Explanation of Method

For each method, use its known error-bound formula together with $\max|f''|=2$ (for the midpoint and trapezoidal rules) or $\max|f^{(4)}|=24$ (for Simpson's rule) on $[1,2]$ to solve for the smallest number of subintervals guaranteeing error below $0.001$, then carry out the computation with that many subintervals.

Step 0: Derivative bounds

For $f(x)=1/x$: $f''(x)=2/x^3$, $f^{(4)}(x)=24/x^5$, both maximized at $x=1$ on $[1,2]$: $\max|f''|=2$, $\max|f^{(4)}|=24$.

Step 1(a): Midpoint rule — required $n$

$E_{\text{rect}}\le\dfrac{1}{24n^2}\times2=\dfrac{1}{12n^2}\le0.001\ \Rightarrow\ n^2\ge83.3\ \Rightarrow\ n\ge10$. Using $n=10$ ($h=0.1$), the midpoint sum gives

\[\boxed{I_{\text{rect}}\approx0.692835}\ \ (E\approx3.12\times10^{-4}<0.001)\]

Step 1(b): Trapezoidal rule — required $n$

$E_{\text{trap}}\le\dfrac{1}{6n^2}\times2=\dfrac{1}{6n^2}\le0.001\ \Rightarrow\ n^2\ge166.7\ \Rightarrow\ n\ge13$. Using $n=13$ ($h=1/13$), the trapezoidal sum gives

\[\boxed{I_{\text{trap}}\approx0.693517}\ \ (E\approx3.70\times10^{-4}<0.001)\]

Step 1(c): Simpson's rule — required $n$

$E_{\text{Simpson}}\le\dfrac{1}{180(2n)^4}\times24=\dfrac{1}{120n^4}\le0.001\ \Rightarrow\ n^4\ge8.33\ \Rightarrow\ n\ge2$. Using $n=2$ (4 intervals, $h=0.25$), the Simpson sum gives

\[\boxed{I_{\text{Simpson}}\approx0.693254}\ \ (E\approx1.07\times10^{-4}<0.001)\]

Step 2: Efficiency comparison

All three methods meet the $0.001$ tolerance, but with very different costs: the midpoint rule needs 10 function evaluations, the trapezoidal rule needs 14, while Simpson's rule needs only 5 — a direct consequence of Simpson's $O(h^4)$ convergence versus $O(h^2)$ for the other two.


Result

Final answer:

\[\boxed{\ln2\approx0.693147;\quad \text{rect}(n{=}10)\approx0.692835,\ \ \text{trap}(n{=}13)\approx0.693517,\ \ \text{Simpson}(n{=}2)\approx0.693254}\]