I was reading Scientific Computin, An Introductory Survey, by Michael Heath. In the Example 1.11, he madr a Finite Difference Aproximation, with the usual approxination : $f’(x)\neq \frac{f(x+h)-f(x)}{h}$. He postules the following:
We want h to be small so that the approximation will be accurate, but if h is too small, then fl(x + h) may not differ from fl(x). Even if $fl(x + h)\neq fl(x)$, we might still have $fl(f(x + h)) = fl(f(x))$ if $f$ is slowly varying. In any case, we can expect some cancellation in computing the difference $f (x + h) − f (x).$ Thus, there is a trade-off between truncation error and rounding error in choosing the size of h. If the relative error in the function values is bounded by ε, then the rounding error in the approximate derivative value is bounded by $2ε|f(x)|/h$. The Taylor series expansion $$f (x + h) = f (x) + f ′ (x)h + f ′′ (x)h2 /2 + · · ·$$ gives an estimate of $Mh/2$ for the truncation error, where M is a bound for $|f′′(x)|.$
I would like to know how could he get both errors, I can’t get the results he is giving. Any idea would be great