Is $g:\Bbb{R} \to \Bbb{R}, g(x)=\ln(1+|x|)$ differentiable

42 Views Asked by At

Is $g:\Bbb{R} \to \Bbb{R}, g(x)=\ln(1+|x|)$ differentiable ? If it is find the derivative.

My attempt:

$g(x)= \begin{cases} \ln(1+x) & \text{if} \ \ x\ge 0\\ \ln(1-x) & \text{if} \ \ x< 0 \end{cases} $

And we have that

$\lim_{x\to 0^+} \frac{g(x)-g(0)}{x-0}=\lim_{x \to 0^+} \frac{\ln(1+x)}{x}=1$

$\lim_{x\to 0^-} \frac{g(x)-g(0)}{x-0}=\lim_{x \to 0^-} \frac{\ln(1-x)}{x}=-1$

Then $\lim_{x\to 0} \frac{g(x)-g(0)}{x-0}$ does not exist. And hence $g’(0)$ doesn’t exist. $g$ is not differentiable at $x=0$.

For $x<0$, $g’(x)=\frac{-1}{1-x}=\frac{1}{x-1}$.

For $x>0$, $g’(x)=\frac{1}{1+x}$

Therefore $g$ is differentiable at $\Bbb{R}\setminus \{0\}$ and

$ g’(x)= \begin{cases} \frac{1}{1+x} & \text{if} \ \ x> 0\\ \frac{1}{x-1} & \text{if} \ \ x< 0 \end{cases} $

Is that true, please?