Differentiability of $\cos |x-5|+\sin |x-3|+|x+10|^3-(|x|+4)$.

Question : Test the differentiability of the function $$\cos |x-5|+\sin |x-3|+|x+10|^3-(|x|+4)$$ at the points $5, 3, -10, 0$.

Solution : Now $\cos |x|$ is differentiable everywhere. So is $\sin |x|$ as well as $|x|^3$. Therefore the only issue is the function $|x|$ at $x=0$. Therefor the function is differentiable at all the other points except $x=0$.

Is this correct?

• No it's not. The cosine term does not vanish at $5.$ It equals $1$ there. And $\sin |x|$ is not differentiable everywhere. – zhw. Jun 13 '15 at 11:56
• Thank you very much. I see why that is. The limit in the $\frac{\sin 0 -\sin |x|}{0-x}$ will tend to 1 from the right hand side and -1 from the left hand side. I was picturing a nice smooth curve for $\sin |x|$ at $x=$. – Miz Jun 14 '15 at 3:29

No, it is not correct. First, $\cos |x-5|$ does not vanish at $5$. Remember $\cos 0=1\neq 0$.

$\cos |x|$ is differentiable everywhere.

$\sin |x|$ is differentiable everywhere except at $x=0$.

More generally, $|x|^n$ is differentiable everywhere for any $n\in\Bbb Z_{\ge 2}$.

$|x|$ is differentiable everywhere but at $x=0$.

So the function is differentiable everywhere but at the points $x$ such that either $x-3=0$ or $x=0$.

• For $x>0$, $\vert x \vert=x$. Hence $\cos \vert x \vert$ is differentiable on $(0,+\infty)$. The only potential poit where the function is not differentiable is $0$. – mathcounterexamples.net Jun 13 '15 at 13:28
• @user26486 Thank you. I see how your point. – Miz Jun 14 '15 at 3:30