When is $y=|P(x)|$ is differentiable? 
Let $P:\mathbb{R}\to\mathbb{R}$ denote the polynomial function. When is $y=|P(x)|$ differentiable?

I found out that $y=|P(x)|$ may be differentiable through-out $\mathbb{R}$ or it may not be. When it is not differentiable thorough out $\mathbb{R}$, the points of non- differentiability occur at $P(x)=0$. Is there any more detail which can be given about this?

If $P$ is a polynomial, then $|P|$ is continuous. Because the continuity, if $P(a)>0$, it's positive as well in a neighborhood of $a$, so $|P|=P$ in the neighborhood of $a$, and hence differentiable at $a$, because $P$ is differentiable there. A similar argument works for the $P(a)<0$ case as well. If $P(a)=0$, then there exists a polynomial $Q$ so that $\forall x$ we have that $P(x)=xQ(x)$. So
$$\frac{|P(x)|}{x}=\frac{|x|}{x}|Q(x)|$$
If the limit of $Q$ at $a$ is $c \neq 0$, then the limit from the left and right are different, so the limit won't exists. If $Q(a)=0$, then you can factor out another $x$, and get that the limit is $0$ at $a$.
