# Continuity of a function, Differentiable function

The following function is given:

$$f:\mathbb{R}\rightarrow \mathbb{R}, \ x\rightarrow \begin{cases} x^2\cos{\left(\frac{1}{x}\right)} & \text{for } x \neq 0\\ 0& \text{for } x =0\end{cases}$$

1. Show that $f$ is everywhere differentiable
2. Calculate the derivative $f\,'$
3. Show that $f^{'}$ is not continuous at point $x_{0}=0$

2. $f\,'(x)=2x\cos{\dfrac{1}{x}}+\sin{\dfrac{1}{x}}$

-
What is your question? – providence Feb 4 '13 at 2:16

You’ve calculated $f\,'(x)$ only for $x\ne 0$; to finish the problem, you’ll have to calculate $f\,'(0)$ as well. That will handle (1) by showing that the derivative exists everywhere, and it will complete (2). (You can already do (3) on the basis of your calculated derivative.) To do this, use the definition:
$$f\,'(0)=\lim_{h\to 0}\frac{f(0+h)-f(0)}h=\lim_{h\to 0}\frac{h^2\cos\frac1h}h=\lim_{h\to 0}h\cos\frac1h\;.$$
ok so 1. and 2. are done. A function is continuous when $\lim _{ x\rightarrow x_{ 0 } }{ f(x)=f(x_{ 0 }) }$ , but $\lim _{ x\rightarrow 0 }{ f^{ ' }(x) } \neq 0$ so the function is not continuous at point $0$ because $f^{'}(0)=0$, right ? – Devid Feb 4 '13 at 10:03
@Devid: Exactly. In fact $\lim_{x\to 0}f\,'(x)$ doesn’t even exist, so you don’t have to know $f\,'(0)$ to know that $f\,'$ isn’t continuous at $0$. – Brian M. Scott Feb 4 '13 at 20:45