EXERCISE VERIFICATION: Find where $f(x):=|x|+|x+1|$ is differentiable and calculate its derivative Could someone verify my exercise?
a) $f(x):=|x|+|x+1|$

First, analyse the roots of each absolute value, where they go to zero:
$$|x|:=\left\{\begin{matrix}
 & x& x>0 \\ 
 & x- &  x<0\\ 
 & 0 & x=0
\end{matrix}\right.$$
$$|x+1|:=\left\{\begin{matrix}
 & x+1& x>-1 \\ 
 & -(x+1) &  x<-1\\ 
 & 0 & x=-1
\end{matrix}\right.$$
So the principal function will be:
$$f(x):=|x|+|x+1|:=\left\{\begin{matrix}
 & x+x+1 &=2x+1& x\ge0 \\ 
 & -x+x+1&=1 &  -1\le x<0\\ 
 & -x-x-1 &=-(2x+1) & x<-1
\end{matrix}\right.$$
So, the derivatives wil be:
for $x\ge0$:
$$\lim_{x\to c} \dfrac{f(x)-f(c)}{x-c}=\lim_{x\to c} \dfrac{2x+1-2c-1}{x-c}=\lim_{x\to c} \dfrac{2(x-c)}{x-c}=\lim_{x\to c}2= 2$$
for $-1\le x<0$:
$$\lim_{x\to c} \dfrac{f(x)-f(c)}{x-c}=\lim_{x\to c} \dfrac{1-1}{x-c}=\lim_{x\to c} \dfrac{0}{x-c}=\infty$$ so, $f(x)$ isn´t differentiable at $.-1\le x<0$
for $x<-10$:
$$\lim_{x\to c} \dfrac{f(x)-f(c)}{x-c}=\lim_{x\to c} \dfrac{-(2x+1)+(2c+1)}{x-c}=\lim_{x\to c} \dfrac{-2(x-c)}{x-c}=\lim_{x\to c}-2= -2$$
So, $f(x)$ isn´t differentiable at $-1\le x<0$
 A: It is a good idea to draw the function first:

From this we guess that the function is differentiable except at $x=-1$ and $x=0$.
Your formula for $f$ above is correct, and from this we see that for $x \in \mathbb{R} \setminus \{-1,0\}$, the function $f$ is differentiable.
For $x=-1$, we see that ${f(-1+h)-f(-1) \over h} = 0$ for $h \in (0,1)$ and
${f(-1+h)-f(-1) \over h} = 2$ for $h \in (-1,0)$, hence it cannot be differentiable at $x=-1$ (since the limit as $h \to 0$ doesn't exist). The same
sort of analysis shows that $f$ is not differentiable at $x=0$ as well.
A: Since $|x|=\sqrt{x^2}$,  we have $|x|'=\dfrac{x}{|x|}$ for $x\neq0$, hence $f'(x)=\dfrac{x}{|x|}+\dfrac{x+1}{|x+1|}$ for $x\notin\{-1,0\}$.
A: Your approach seems fine, but one thing you have wrongly deduced is :

f(x)  isn't differentibale at −1≤x<0

Not exactly. The correct interpretation is "$f(x)$ isn't differentiable at $x=-1$ and $x=0$". The function is differentiable elsewhere on the domain.
To find that the function is differebtiable or not, you find the Left and Right Hand Derivatives at $x=-1$ and $x=0$. Because these are the points where the function is likely to change its behavior.
Note: As copper.hat has suggested, drawing curve necessarily helps to understand the behavior of differentiability of the function. If you see some values changing suddenly and sharply, you can very well conclude that the function is not differentiable at those points of sharp transition (which happens here at $x=-1$ and $x=0$). If the curve is smooth, the function can still be non-differentiable and you may need to check LHD and RHD.
