How to arrive at this Taylor series expansion for the given function

finite differencesnumerical methodstaylor expansion

This is taken from my textbook on numerical analysis/scientific computing:

enter image description here

I don't quite understand the explanations here and was hoping someone could help break this down for me. I am able to get the first two terms by simply rearranging the given approximation:

$f(x+h) = h*f'(x) + f(x) = f(x) + f'(x)h$

But the third term, and the explanation in the text that follows, seems to appear out of nowhere.

From Taylor series, I recognize it as the natural third term that would arise in approximating a function, but what's with the theta and the stuff about $M$?

Best Answer

First, note that $$f(x+h) \simeq h*f'(x) + f(x) = f(x) + f'(x)h$$ is an approximation, not an equality.

The error of the estimate can be written explicitely by the Lagrange Remainder, a more general version of the Mean Value Theorem. This result is exactly what they use here.

Related Question