from Brian Bradie -Friendly introduction to numerical analysis---- numerical differentiation exercise $$ f'(x_0)=\frac{-2f(x-0-3h)+9f(x_0-2h)-18f(x_0-h)+11f(x_0)}{6h}+\frac14h^3f^{(4)}(\xi) $$
The image shows an example problem that asks to calculate the error bound (totalerror) of a 4 point formula #15 chap6.3.
I know that
total error = maximumroundofferror + truncationerror
the truncation error is given but how does one compute the roundoff error ?
What is the general methodology for solving for roundoff error for 3 point formulas, 4 point formulas, and 5 point formulas
It is fairly straightforward for a two point formula but I cannot translate how to do it for this problem and similar ones
i.e. if have $f '(x_o) = \dfrac{f(x_o+h)-f(x_o-h)}{2h}$ and want to find the total error, I do :
a ) let $\tilde f(x_o + h) = fl(f(x_o+h))$, $\tilde f(x0-h)=fl(f(xo-h)$
b ) let rounding errors be $\epsilon_1$ and $\epsilon_2$ as in $$ f(x_o+h) - \tilde f(x_o+h) = ϵ_1 \\ f(x_o-h) - \tilde f(x_o-h) = ϵ_2 $$
c ) then $$ f '(x_o) = \frac{[\tilde f(x_o+h) + ϵ_1] - [\tilde f(x_o-h)+ϵ_2]}{2h} = (\tilde f(x_o+h) - \tilde f(x_o-h))/2h + (ϵ_1-ϵ_2)/2h $$ since roundoff errors are bounded by machine error epsilon then $|ϵ_1|\le ϵ$ and $|ϵ_2|\le ϵ$ hence $$ |f'(x_o) - (\tilde f(x_o+h)-\tilde f(x_o-h))/2h| \le ϵ/h $$
I am trying to get this same result for the formula in the image but having trouble
please excuse this non formatting as I am a new user and don't have enough points to plug in image of my formatted work.
Any help would be greatly appreciated or a point in the right direction
The short and sometimes wrong answer is that each function evaluation gives a random error of size $L|f(x_0)|ϵ$, where $L$ is the number of floating point operations in the evaluation of $f$. For the differentiation formula the floating point noise thus sums up to a worst case of size $$\frac{40L|f(x_0)|ϵ}{6h}=\frac{20L|f(x_0)|ϵ}{3h}.$$
This estimate is invalid if critical cancelation takes place during the evaluation of $f$, such as is the case in the evaluation of polynomials close to their roots. Then you would have to replace $f$ by $\bar f$ where each constant is replaced by its absolute value and each subtraction by the addition of same terms.