Problems

3.5. Problems#

2.1 Evaluate the first order derivative of \(\sin(x)\) for interval \((0,2\pi)\) with tolerance 0.0001 at \(x=\frac{\pi}{4}\), \(\frac{\pi}{2}\), and \(\pi\). What value of \(h\) is needed to satisfy the tolerance at each point? Is the optimal \(h\) independent of \(x\)?


2.2 Evaluate the second order derivative of \(f(x)=\displaystyle\frac{1}{12} x^4\) at \(x=1\) usig \(h=1, 0.1, 0.01, \cdots, 10^{-10}\).

(1) First use the three-poiojt method. Compare the result with the exact derivative (\(f''(x) = x^2\)) and plot the error as a function of \(h\).

(2) Try also the five-point method and evaluate the error. You will find unexpectedly good result even for relatively large values of \(h\). Can you explain why the error is so small in this case?


Last modified on 2/14/2024 by R. Kawai