How do I prove that $f'$ is continuous at $0$? I have edited my question to the better. I'm sorry for those who put time answering it.
My function is 
f(x) = \begin{cases}
       \text{$−1 + x + 4x^2 \cos(\frac{1}{x})$}
       \text{}
        &\quad\text{if x≠0}\\
       \text{-1} &\quad\text{x=0.} \\ 
     \end{cases}
And the derivative is $$f'(x)= 1 + 8x \cos(\frac{1}{x}) + 4 \sin (\frac{1}{x})$$
I know I'm suppose to use this function to prove that the function is continuous at zero  $$f'(x)= \lim_{h \to 0}\frac{f(x+h)-f(x)}{h}$$
I'm stuck at that part.
 A: Well, you certainly want to define $f(0)$ to be $-1$, ’cause that’s what makes the function continuous. But let’s concentrate on the troublesome part, $x^2\cos(\frac1x)$, which I’ll call $g(x)$, which we want to define to have value zero at $0$, again for continuity.
You’ve given the right formula for $f'$ when $x\ne0$, and similarly $g'(x)=2x\cos(\frac1x)+\sin(\frac1x)$ when $x\ne0$. For the derivative at zero, you have to go to the definition:
$$
g'(0)=\lim_{h\to0}\frac{g(h)-g(0)}h=\lim_{h\to0}\frac{g(h)}h=\lim_{h\to0}h\cos\left(\frac1x\right)=0\,,
$$
so that this $g$, and thus $f$, is differentiable everywhere, even at zero.
Now, as for continuity at zero, I think you can see that the derivative is not continuous; I’ll leave it to you to fill in details.
A: Note that 
$$f(x)= −1 + x + 4x^2 \cos\left(\frac{1}{x}\right)$$
is not defined at $x=0$ because the $\cos\left(\frac{1}{x}\right)$ is not defined at $x=0$.
Anyway since
$$\lim_{x\to 0}f(x)=-1$$
we can define $f(0)=-1$ to obtain a continuos function
$$g(x)=\begin{cases} -1 + x + 4x^2 \cos\left(\frac{1} {x}\right)\quad x\neq 0\\-1\quad x=0\end{cases}$$
and
$$g'(0)= \lim_{x \to 0}\frac{g(x)-g(0)}{x}=\lim_{x \to 0} \left( 1 + 4x \cos\left(\frac{1} {x}\right)\right)=1$$
but for $x\neq 0$ we have
$$g'(x)= 1 + 8x \cos(\frac{1}{x}) + 4 \sin (\frac{1}{x})$$
and, since the limit at $0$ for $g'(x)$ doesn't exist, g'(x) is not continuos at $x=0$.
