# How do you prove that the function f(x) = | x | is continuous at x=0, but not differentiable at x=0?

Mar 22, 2016

See the explanation, below.

#### Explanation:

To show that $f \left(x\right) = \left\mid x \right\mid$ is continuous at $0$, show that ${\lim}_{x \rightarrow 0} \left\mid x \right\mid = \left\mid 0 \right\mid = 0$.

Use $\epsilon - \delta$ if required, or use the piecewise definition of absolute value.

$f \left(x\right) = \left\mid x \right\mid = \left\{\begin{matrix}x & \text{if" & x >= 0 \\ -x & "if} & x < 0\end{matrix}\right.$

So, ${\lim}_{x \rightarrow {0}^{+}} \left\mid x \right\mid = {\lim}_{x \rightarrow {0}^{+}} x = 0$

and ${\lim}_{x \rightarrow {0}^{-}} \left\mid x \right\mid = {\lim}_{x \rightarrow {0}^{-}} \left(- x\right) = 0$.

Therefore,

${\lim}_{x \rightarrow 0} \left\mid x \right\mid = 0$ which is, of course equal to $f \left(0\right)$.

To show that $f \left(x\right) = \left\mid x \right\mid$ is not differentiable, show that

$f ' \left(0\right) = {\lim}_{h \rightarrow 0} \frac{f \left(0 + h\right) - f \left(0\right)}{h}$ does not exists.

Observe that

${\lim}_{h \rightarrow 0} \frac{\left\mid 0 + h \right\mid - \left\mid 0 \right\mid}{h} = {\lim}_{h \rightarrow 0} \frac{\left\mid h \right\mid}{h}$

But $\frac{\left\mid h \right\mid}{h} = \left\{\begin{matrix}1 & \text{if" & h > 0 \\ -1 & "if} & h < 0\end{matrix}\right.$,
so the limit from the right is $1$, while the limit from the left is $- 1$.

So the two sided limit does not exist.

That is, the derivative does not exist at $x = 0$.