Skip to main content

Exercises 2.5 Exercises

1.
Modify the code in Section 2.2 to verify numerically that the approximation of \(f'(x_0)\) given by the formula
\begin{equation*} \frac{f(x_0-2h)-8f(x_0-h)+8f(x_0+h)-f(x_0+2h)}{12h} \end{equation*}
is of order 4, namely the truncation error goes to zero as \(h^4\text{.}\)
2.
Determine how many terms of the Taylor series one has to sum in order to evaluate the function \(\log x\) at \(x=3\) with an error not larger than \(10^{-4}\text{.}\)