# Whats the derivative of the absolute value to the power of p?

michonamona

## Homework Statement

Let p>0. What is the derivative of $$|x|^{p}$$?

## The Attempt at a Solution

I know that if p is even, then the derivative is just $$px^{p-1}$$. But what if x is odd? Would it turn out to be some piecewise function, such as

$$px^{p-1},\: if x \geq 0$$ and $$-px^{p-1}, \: if x < 0$$

Any insights?

Thanks,
M

Homework Helper
Is the function |x|^n continuous everywhere ? How about differentiable ?

michonamona
Ok, |x|^p is definitely continuous everywhere. I graphed it and it looks differentiable at x=0 (seems to be the local min). Is the following a valid proof?

Show that |x|^p, p>1 is differentiable at x=0

$$lim_{h->0^{+}} \frac{|0+h|^{p} - |0|^p}{h}= lim_{h->0^{+}} \frac{|h|^{p}}{h}=lim_{h->0^{+}} |h|^{p-1} = 0$$, since h is always positive as it approaches 0 from the right. Similarly

$$lim_{h->0^{-}} \frac{|0+h|^{p} - |0|^p}{h}=lim_{h->0^{-}} \frac{|h|^{p}}{h}=lim_{h->0^{-}} |h|^{p}h^{-1}$$.

Since h is always negative as it approaches zero from the right, then

$$lim_{h->0^{-}} |h|^{p}h^{-1}=lim_{h->0^{-}} (-h)^{p}h^{-1}=lim_{h->0^{-}} (-1)^{p}h^{p}h^{-1} = lim_{h->0^{-}} (-1)^{p}h^{p-1}=0$$

Since the left and right limits are equal then the limit exist and is finite at x=0. Therefore we can take the derivative of |x|^p as p|x|^(p-1).

Is this ok?

Thank you,
M

╔(σ_σ)╝
For p=1 the fucntion is not even differentiable at 0.

The slope to the left of zero is negative that to the right of zero. Hence the "left and right" derievatives are unequal.

Homework Helper
What happens when $0<p\leq 1$ ?

Staff Emeritus
Homework Helper
Gold Member
...

$$lim_{h->0^{+}} \frac{|0+h|^{p} - |0|^p}{h}= lim_{h->0^{+}} \frac{|h|^{p}}{h}=lim_{h->0^{+}} |h|^{p-1} \,,$$ since h is always positive as it approaches 0 from the right.
$$=\left\{\begin{array}{cc}0 \,,&\mbox{ if } p>1\\ 1, & \mbox{ if } p=1\\ \to+\infty, & \mbox{ if } p<1 \end{array}\right.$$​
$$lim_{h->0^{-}}\ \frac{|0+h|^{p} - |0|^p}{h}=lim_{h->0^{-}}\ \frac{|h|^{p}}{h}=lim_{h->0^{-}}\ |h|^{p}h^{-1} .$$

Since h is always negative as it approaches zero from the [STRIKE]right[/STRIKE] left, then

$$lim_{h->0^{-}}\ |h|^{p}h^{-1}=lim_{h->0^{-}}\ (-h)^{p}h^{-1}$$

M
Hello M.

$$\lim_{h->0^{-}}\ (-h)^{p}h^{-1}=\lim_{h->0^{-}}\ (-h)^{p}(-1)(-h)^{-1}=\lim_{h->0^{-}}\ (-1)(-h)^{p-1}$$
$$=\left\{\begin{array}{cc}0 \,,&\mbox{ if } p>1\\ -1, & \mbox{ if } p=1\\ \to-\infty, & \mbox{ if } p<1 \end{array}\right.$$​

You still need to find $$\textstyle \frac{d}{dx}\ \left|x\right|^p\,$$ for x≠0 .

It shouldn't be a problem for x>0 .

For x<0, remember that |x|= ‒x .

Last edited:
Staff Emeritus
If $$\textstyle p$$ is real or rational, and $$x<0$$ then you should avoid writing $$x^{p}.$$
$$\text{If }\ x<0\,,\ \text{ then using the chain rule: }\ \frac{d}{dx}\ \left(-x\right)^p=p\left(-x\right)^{p-1}\cdot\frac{d}{dx}\left(-x\right)=-p\left(-x\right)^{p-1}\,.$$