I am reading in Saad - "Iterative Methods for sparse linear systems" where the centered difference approximation is discussed.
Let $U\subset \mathbb{R}$ be a domain and $u\in\mathcal{C}^4(U)$. We then have by Taylor's formular
$$u(x+h)=u(x)+h\frac{\mathrm{d}(x)}{\mathrm{d}x}+ \frac{h^2}{2}\frac{\mathrm{d}^2(x)}{\mathrm{d}x^2}+\frac{h^3}{6}\frac{\mathrm{d}^3(x)}{\mathrm{d}x^3}+\frac{h^4}{24}\frac{\mathrm{d}^4(\xi_+)}{\mathrm{d}x^4}$$
where $\xi_+\in (x,x+h)$, by the remainder of Lagrange. If we replace $h\mapsto -h$ we analogously get
$$u(x-h)=u(x)-h\frac{\mathrm{d}(x)}{\mathrm{d}x}+ \frac{h^2}{2}\frac{\mathrm{d}^2(x)}{\mathrm{d}x^2}-\frac{h^3}{6}\frac{\mathrm{d}^3(x)}{\mathrm{d}x^3}+\frac{h^4}{24}\frac{\mathrm{d}^4(\xi_-)}{\mathrm{d}x^4}$$
where $\xi_-\in(x-h, x)$.
We add the two equations, divide by $h^2$ and use the mean value theorem for the fourth order derivative we get the following approximation of the second derivative
$$ \frac{\mathrm{d}^2u(x)}{\mathrm{d}x^2}=\frac{u(x+h)-2u(x)+u(x-h)}{h^2}-\frac{h^2}{12}\frac{\mathrm{d}^4(\xi)}{\mathrm{d}x^4} $$
for $\xi_-\le \xi\le \xi_+$.
I don't understand how the mean value theorem was used to obtain this result and how the boundaries for $\xi$ were computed.
Are you sure they didn't mean the Intermediate Value Theorem? Assume that $\frac{d^4 u(\xi_-)}{dx^4} \leq \frac{d^4 u(\xi_+)}{dx^4}$ (this doesn't matter but lets me avoid making two equations for everything). Using the IVT for the continuous function $\frac{d^4 u(\xi)}{dx^4}$ then for all $c$ satisfying $$\frac{d^4 u(\xi_-)}{dx^4} \leq c \leq \frac{d^4 u(\xi_+)}{dx^4} $$ There must exist $\xi \in [\xi_-, \xi_+]$ such that $$\frac{d^4 u(\xi)}{d^4 x} = c $$ Specifically let
$$ \frac{d^4 u(\xi)}{d^4 x} = \frac{1}{2}\left(\frac{d^4 u(\xi_-)}{d^4 x} + \frac{d^4 u(\xi_+)}{d^4 x}\right) $$ We insert this into the findiff approxmation and get a simplified expression for the remainder term.