<s>[INST] Differentiability of function involving absolute values I need to check the differentiability at $x=-10$ of the following function.
$f(x)=\cos|x-5|+\sin|x-3|+|x+10|^3-(|x|+4)^2$
Now, 
\begin{align*}
\text{LHD} &= \lim_{x\to -10^-}\frac{f(x)-f(-10)}{x+10}\\
&= \lim_{x\to -10^-}\frac{\cos(x-5)-\sin(x-3)-(x+10)^3-(4-x)^2-(\cos15-\sin13-14^2)}{x+10}\\
&= \lim_{x\to -10^-}\frac{2\sin(\frac{x+10}{2})\sin(\frac{20-x}{2})+2\cos(\frac{x+10}{2})\sin(\frac{16-x}{2})-(x+10)^3+(10+x)(18-x)}{x+10}\\ \\
&=-\infty
\end{align*}
Similarly, 
RHD = $+\infty$. So, not differentiable. But the answer says that $f(x)$ is differentiable at $-10$.
Can anyone please help?
 [/INST] Let's concentrate on the $|x+10|^3$ component since near $x=-10$ we have $$|x-5| =5-x $$$$|x-3|=3-x$$ and $$|x|+4=-x+4$$ and the components involving these quantities are readily seen to be differentiable.
Now $|x+10|$ is continuous at $x=-10$ but not differentiable there. We have 
$$|x+10|^3= -(10+x)^3 \text{ for }x \le -10$$ and (noting that $x=-10$ is still a point of continuity and doesn't require a special definition) $$|x+10|^3= (10+x)^3 \text{ for }x \ge -10$$
Now if we plug a small change $h$ into the definition of the derivative for $f(x)=|x+10|^3$ we are looking at  $\cfrac {f(x+h)-f(x)}h$. 
We note that $f(-10)=0$, and that $f(-10+h)=|h|^3$. So $$\frac{f(-10+h)-f(-10)}h=\frac {|h|^3}h=\frac {h\cdot|h|^3}{h^2}=h\cdot|h|$$
(note $h^2=|h|^2$), and you should be able to complete the problem from there.
</s>