# How to determine whether this function is differentiable at a point?

We are given the following function:

$$f(x) = \left\{ \begin{array}{ll} \dfrac{x}{1+x} & x \geq 0 \\ x^2 & x < 0 \\ \end{array} \right.$$

We wanted to determine whether or not $f(x)$ is differentiable at $0$. I already know that $f(x)$ is continuous at $0$ using the definition of continuity. If I am correct, to show differentiability we have to show that the following limit exists:

$f'(x)=\lim_{~h \to 0} \dfrac{f(x+h)-f(x)}{h}$. Since $f(x) = \dfrac{x}{1+x}$ at $x=0$, would it then be enough to say that the derivative of $[\dfrac{x}{1+x}]' = \dfrac{1}{(x+1)^2}$ is defined at $x=0$, and since we know that $f(x)$ is also continuous at $0$, we can say $f(x)$ is differentiable at $0$?

• both derivatives at $x=0$ should be equal – janmarqz Oct 4 '15 at 23:23

The derivative at $0$ is given by the limit

\begin{align} f'(0)&=\lim_{h\to 0}\frac{f(h)-f(0)}{h}\\\\ &=\lim_{h\to 0}\frac{f(h)}{h} \end{align}

if this limit exists. If $h>0$, then

\begin{align} f'(0)&=\lim_{h\to 0^+}\frac{\frac{h}{1+h}}{h}\\\\ &=1 \end{align}

If $h<0$, then

\begin{align} f'(0)&=\lim_{h\to 0^-}\frac{h^2}{h}\\\\ &=0 \end{align}

The right-side and left-side limits are not equal. Therefore, the derivative at $0$ does not exist.

If $f(x)$ is differentiable then the derivatives from the left and right must be equal at $x=0$. The derivative of $\dfrac{x}{1+x}$ at $x=0$ is $1$. The derivative of $x^2$ is $0$ at $x=0$. Thus $f(x)$ is not differentiable at $x=0$.