TITLE: Let f be a function twice differentiable and with derivatives continuous on an interval $[a,b]$ containing $0$. Prove the following statement:
QUESTION [6 upvotes]: $$\lim_{x\to0}  \frac{f'(x) - \frac{f(x)-f(0)}{x}}{x} = \frac{f''(0)}{2}$$
I have been thinking about this for a bit of time now, but I'm not getting anything. What I have done: write $f'(x)$ as it's defined:
$$f'(x) = \lim_{h\to x}\frac{f(h) - f(x)}{h-x}$$
Now we can write: 
$$\lim_{x\to0}  \frac{f'(x) - \frac{f(x)-f(0)}{x}}{x} = \lim_{x\to0}  \frac{\lim_{h\to x}\frac{f(h) - f(x)}{h-x} - \frac{f(x)-f(0)}{x}}{x}  $$
I have tried lots of algebraic manipulation after this, but nothing has come out so far. Could someone steer me in the right direction?
EDIT: I just opened Rudin, which has a similar question that indicates that l'Hopital's should be used. Indeed:
$$\lim_{x\to0} \frac{f'(x) - \frac{f(x)-f(0)}{x}}{x} = \lim_{x\to0} \frac{xf'(x) - f(x)-f(0)}{x^2}$$
We can apply l'Hôpital:
$$ \lim_{x\to0} \frac{xf'(x) - f(x)-f(0)}{x^2} = \lim_{x\to0}\frac{f'(x) + xf''(x) - f'(x)}{2x} = \frac{f''(0)}{2}$$
EDIT #2Using Taylor's theorem, as suggested in the comments.
We choose to perform the Taylor expansion of $f(0)$ at $x_0 = x $. Then:
$\exists c $ between $x$ and $0$ such that:
$$f(0) = f(x) - xf'(x) + \frac{x^2f''(c)}{2} \implies \frac{f''(c)}{2} = \frac{f'(x) - \frac{f(x)-f(0)}{x}}{x}   $$
As $x\to 0$, $c\to 0 $ and we have 
$$\lim_{x\to0}  \frac{f'(x) - \frac{f(x)-f(0)}{x}}{x} = \frac{f''(0)}{2}$$

REPLY [2 votes]: The answer by user "zhw." is my favorite but here is an approach which uses L'Hospital and assumes only the existence of $f''(0)$ (and not the continuity of $f''$).
We have
\begin{align}
L &= \lim_{x \to 0}\dfrac{f'(x) - \dfrac{f(x) - f(0)}{x}}{x}\notag\\
&= \lim_{x \to 0}\frac{xf'(x) - f(x) + f(0)}{x^{2}}\tag{*}\\
&= \lim_{x \to 0}\frac{xf'(x) - xf'(0) + xf'(0) - f(x) + f(0)}{x^{2}}\notag\\
&= \lim_{x \to 0}\frac{f'(x) - f'(0)}{x} + \frac{xf'(0) - f(x) + f(0)}{x^{2}}\notag\\
&= f''(0) + \lim_{x \to 0}\frac{xf'(0) - f(x) + f(0)}{x^{2}}\notag\\
&= f''(0) + \lim_{x \to 0}\frac{f'(0) - f'(x)}{2x}\text{ (via L'Hospital's Rule)}\notag\\
&= f''(0) - \frac{1}{2} \lim_{x \to 0}\frac{f'(x) - f'(0)}{x}\notag\\
&= f''(0) - \frac{f''(0)}{2}\notag\\
&= \frac{f''(0)}{2}\notag
\end{align}
The direct use of L'Hospital's Rule just after the step marked $(*)$ above also gives the answer but only if we assume that $f''$ is continuous at $0$ (this is the approach given in question also). Moreover note that the existence of $f''$ in a neighborhood of $0$ is essential to apply L'Hospital's Rule after step marked $(*)$. The approach above avoids these unnecessary conditions and relies only on existence of $f''(0)$ and nothing more.
Also note that we have $$\lim_{x \to 0}\frac{f(x) - f(0)}{x} = f'(0)$$ but we must resist the temptation to replace the expression $(f(x) - f(0))/x$ with $f'(0)$ (this leads to wrong answer $f''(0)$) because in general while evaluating the limit of an expression we can not replace a sub-expression by its limit.