When is $y=|P(x)|$ is differentiable?

109 Views Asked by At

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?

4

There are 4 best solutions below

3
On

$|P(x)|$ is differentiable if it has no real single roots. In other words, whenever $P(x_0)=0$, then $P'(x_0)=0$ as well.

0
On

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$.

0
On

Discussing non-differentiablity is more crucial and important:

The function $P(x)$ which is continuous at $x=x_0$, $P(x_0)=0$, $P(x_0-h)P(x_0+h)<0$ and $P'(x_0) \ne 0$, $|P(x)|$ is non-differentiable at $x=x_0$ otherwise it is differentiable. $|x|$ is non-differentiable at $x=0$, but $|x^3|$ is differentiable here. Similarly $|\tan x|$ and $|\sin x|$ are non-differentiable at $x=0.$ The function $|\cos(\pi/x)$| is non-differentiable at $x=2/(2n+1),n=0,1,2,...$

2
On

I've upvoted Arthur's answer, but I'd like to add a perspective on why Arthur's answer is correct, since none of the answers seem to address the why of it.

Let $$\newcommand\sgn{\operatorname{sgn}}\sgn(x) = \begin{cases} -1 &x<0\\1&x\ge0\end{cases}$$ be the sign function that returns the sign of its argument. Observe that $|x|=x\sgn(x)$.

Thus if $f:\Bbb{R}\to\Bbb{R}$ is any real valued function, $|f|(x) = f(x)\sgn(f(x))$. If $f$ is differentiable, then when $f(x)\ne 0$, both $f(x)$ and $\sgn(f(x))$ are differentiable, so we can apply the product rule to get $$|f|'(x) = f'(x)\sgn(f(x)) + f(x)f'(x)\sgn'(f(x)),$$ but $\sgn'(x)=0$, when $x\ne 0$, so the second term is $0$. Thus $$|f|'(x) = f'(x)\sgn(f(x)),$$ when $f(x)\ne 0$.

What about when $f(x)=0$?

Well, let's take a look at the limit. $$|f|'(x) = \lim_{h\to 0} \frac{|f(x+h)|-|f(x)|}{h} = \lim_{h\to 0} \frac{|f(x+h)|}{h}= \lim_{h\to 0} \left|\frac{f(x+h)}{h}\right|\sgn(h).$$ This limit exists if and only if the left and right hand limits exist and agree, but in the right hand limit $\sgn(h)=1$, and we get $|f'(x)|$, and in the left hand limit $\sgn(h)=-1$, and we get $-|f'(x)|$. Thus when $f(x)=0$, $|f|$ is differentiable at $x$ if and only if $|f'(x)|=-|f'(x)|$, which occurs if and only if $f'(x)=0$.

Thus we obtain Arthur's answer, if $f:\Bbb{R}\to \Bbb{R}$ is differentiable, then $|f|$ is differentiable at $x$ if and only if $f(x)\ne 0$ or $f(x)=f'(x)=0$.

Moreover, when differentiable, $|f|'(x) = f'(x)\sgn(f(x))$.