The Second Derivative Test and the Mean Value Theorem I have been studying for the upcoming Introductory Real Analysis exam and got stuck upon the proof of the second derivative test. Here is a verbatim text of the theorem and the proof from the book:
THEOREM:
Let $I$ be an open interval containing the point $x_0$ and suppose that the function $f:I\rightarrow R$ has a second derivative. Suppose that $ f'(x_0)=0$. If $f''(x_0)>0$, then $x_0$ is a local minimizer of $f:I \rightarrow R$. 
PROOF:
Since
$f''(x_0)=\lim_{x\to{x_0}} \frac{f'(x)-f'(x_0)}{x-x_0}>0$, it follows (see Exercise 16) that there is a $\delta>0$ such that the open interval $(x_0-\delta, x_0+\delta)$ is contained in $I$ and $\frac{f'(x)-f'(x_0)}{x-x_0}>0$ if $0<|x-x_0|<\delta$. But $f'(x_0)=0$, so the (4.13) [preceding inequality] amounts to the assertion that if $|x-x_0|<\delta$, then $f'(x)>0 \text{ if } x>x_0$ and $f'(x)<0 \text{ if } x<x_0$. Using these two inequalities and the [Lagrange] Mean Value theorem, it follows that $f(x)>f(x_0) \text{ if } 0<|x-x_0|<\delta$.
The textbook states the Lagrange Mean Value Theorem as follows:
Suppose the function $f:[a,b] \rightarrow R$ is continuous and $f: (a,b) \rightarrow R$ is differentiable. Then there is a point $x_0$ in the open interval $(a,b)$ at which $f'(x_0)=\frac{f(b)-f(a)}{b-a}$.
Luckily I was able to solve 'Exercise 16,' but I just don't see how I can apply the Lagrange Mean Value Theorem in the latter parts of the proof. Any small hints would be appreciated. Thanks in advanced.

First, apply your MVT to the interval $I=(x_0,x_0+\delta)$. Take an $x\in I$. The MVT says that there is a $c,  x_0<c<x$ such that:
$f'(c)=\frac{f(x)-f(x_0)}{x-x_0} $. 
Since $f'(c) >0$ (it's one of your inequalities), then $f(x)>f(x_0)$. A similar argument holds for the interval $I'=(x_0-\delta,x_0)$.
