Is it true that $ \lim_{x\to0}\frac{f'\left(x\right)-\frac{f\left(x\right)-f\left(0\right)}{x}}{x}=\frac{f''\left(0\right)}{2} $ Let $ f $ be a function such that $ f'' $ exists at $ x=0 $.
Is it true that :
$$ \lim_{x\to0}\frac{f'\left(x\right)-\frac{f\left(x\right)-f\left(0\right)}{x}}{x}=\frac{f''\left(0\right)}{2} ~~?$$
Im pretty sure that in order for this to be true, $ f'' $ should be continuous, which is not given. But I'm struggling to find a counterexample. I need to find a function that is twice differentiable, but $ f'' $ is not continuous (assuming I understood the situation).
I'd appreciate some help. Thanks in advance.
 A: You can use a Taylor expansion:
$$
f(x)=f(0)+xf'(0)+x^2f''(0)/2+x^2\sigma(x)
$$
where $\lim_{x\to0}\sigma(x)=0$. Then
\begin{align}
\frac{1}{x}\Bigl(f'(x)-\frac{f(x)-f(0)}{x}\Bigr)
&=
\frac{1}{x^2}\Bigl(xf'(x)-xf'(0)-x^2f''(0)/2-x^2\sigma(x)\Bigr)\\[6px]
&=-\frac{f''(0)}{2}-\sigma(x)+\frac{f'(x)-f'(0)}{x}
\end{align}
Continuity of the second derivative is not needed; one just needs the (first) derivative exists in a neighborhood of $0$ and is differentiable at $0$.
A: Since
$${f'(x)-{f(x)-f(0)\over x}\over x}={f'(x)-f'(0)\over x}-{f(x)-f(0)-xf'(0)\over x^2}$$
and
$$\lim_{x\to0}{f'(x)-f'(0)\over x}=f''(0)$$
it suffices to show that
$$\lim_{x\to0}{f(x)-f(0)-xf'(0)\over x^2}={f''0)\over2}$$
This can be done with a single application of L'Hopital:
$$\lim_{x\to0}{f(x)-f(0)-xf'(0)\over x^2}=\lim_{x\to0}{f'(x)-f'(0)\over2x}={f''0)\over2}$$
(The final step is not another round of L'Hopital, it's the definition of the second derivative. The only condition that L'Hopital requires here is that the first derivative is defined in a neighborhood of $0$, which must be satisfied in order for $f''(0)$ to exist.)
