Chapter 2: Problem 14
Consider the approximation to the first derivative $$ f^{\prime}(x) \approx \frac{f(x+h)-f(x)}{h} $$ The truncation (or discretization) error for this formula is \(\mathcal{O}(h)\). Suppose that the absolute error in evaluating the function \(f\) is bounded by \(\varepsilon\) and let us ignore the errors generated in basic arithmetic operations. (a) Show that the total computational error (truncation and rounding combined) is bounded by $$ \frac{M h}{2}+\frac{2 \varepsilon}{h}, $$ where \(M\) is a bound on \(\left|f^{\prime \prime}(x)\right|\). (b) What is the value of \(h\) for which the above bound is minimized? (c) The rounding unit we employ is approximately equal to \(10^{-16}\). Use this to explain the behavior of the graph in Example \(1.3\). Make sure to explain the shape of the graph as well as the value where the apparent minimum is attained. (d) It is not difficult to show, using Taylor expansions, that \(f^{\prime}(x)\) can be approximated more accurately (in terms of truncation error) by $$ f^{\prime}(x) \approx \frac{f(x+h)-f(x-h)}{2 h} $$ For this approximation, the truncation error is \(\mathcal{O}\left(h^{2}\right)\). Generate a graph similar to Figure \(1.3\) (please generate only the solid line) for the same function and the same value of \(x\), namely, for \(\sin (1.2)\), and compare the two graphs. Explain the meaning of your results.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.