Decide and prove whether this function is differentiable at $x_0 = 0$

Decide and prove whether

$f(x) = \begin{cases} 0, & \text{if } & x < 0 \\[2ex] 1, & \text{if } & x \ge 0 \end{cases}$

is differentiable at $x_0 = 0$

I know that

If this limit exists then it is.

However I think this limit doesn't for the above function but how do I go about proving it?

• Examine the behavior of $\frac{f(0+h)-f(0)}{h}$ for $h$ approaching zero from the positive numbers, and for $h$ approaching zero from the negative numbers. What does it happen? – Giovanni De Gaetano Feb 25 '16 at 11:21
• Is the limit the same when you take the limit coming from the left AND the right? You need continuity... – Eleven-Eleven Feb 25 '16 at 11:21
• Show the limit from the left differs from the limit from the right. – Vincenzo Oliva Feb 25 '16 at 11:21
• Also, differentiability implies continuity...if your function is differentiable, then it must be continuous. Is your function continuous? – Eleven-Eleven Feb 25 '16 at 11:22

Consider the sequence $x_n=\frac{(-1)^n}n$. It is clear that $\lim_{n\to\infty} x_n=0$, but $$f(x_{2n})=1\implies \limsup_{n\to\infty} f(x_n) = 1$$ and $$f(x_{2n+1})=1\implies \liminf_{n\to\infty} f(x_n) = 0,$$ so $f(x_n)$ does not converge. We conclude that $f$ is not continuous at $0$ (and hence not differentiable at $0$).
We know that if a function is differentiable at a point $x_0$, then it is continuous.
"If a function is not continuous at a point $x_0$, then it is not differentiable".
It is clear from the statements above that taking left and right limits will provide the discontinuity at $x_0=0$ and therefore, the function is not differentiable at $x_0=0$.