0
$\begingroup$

I plotted this graph in wolfram alpha and it looks nice and smooth at $x=0$. Does that mean that $x|x|$ is differentiable at $x=0$? I don't understand formally using the definition of the derivative why this is the case. Thanks.

$\endgroup$
  • $\begingroup$ Yes. But its second derivative does not exist at $0$ $\endgroup$ – ziggurism Nov 20 '17 at 1:35
  • $\begingroup$ "I don't understand formally using the definition of the derivative why this is the case. " Why? What's difficult in writing down the definition? $\endgroup$ – Jack Nov 20 '17 at 2:07
  • $\begingroup$ Yeah, I agree, I was overthinking it. I understand now. $\endgroup$ – kemb Nov 20 '17 at 2:22
4
$\begingroup$

It's not because the graph looks nice and smooth that the function is differentiable, although that is what the term is trying to capture.

The function is differentiable because of the definition of differentiable. The limit $$ \lim_{h\to 0} \frac{f(0+h) - f(0)}{h} = \lim_{h\to 0} \frac{h|h|}{h} = \lim_{h\to 0} |h| = 0 $$

$\endgroup$
2
$\begingroup$

Note that $f(x)=x|x|$ can be written as:

$$f(x)=\cases{ x^2 & $x\ge 0$\\ -x^2 & $x<0$}$$

The derivative of $x^2$ is $2x$, and the derivative of $-x^2$ is $-2x$. Both approach $0$ as $x\to 0$, and we also have $\displaystyle\lim_{h\to 0}\frac{f(h)}{h}=\displaystyle\lim_{h\to 0}|h|=0$, so $f'(x)$ is defined and continuous at $x=0$. The second derivative however, as noted in a comment above, is problematic...

$\endgroup$
2
$\begingroup$

A more "applied-math" approach is use the formula $$\frac{d|x|}{dx}=\mathrm{sgn}(x)$$ for real $x$. Then we have

$$\frac{d(x|x|)}{dx}=|x|+x\,\mathrm{sgn}(x)=2|x|.$$

The first-order derivative is continuous and equals $\,0\,$ at $\,x=0$. The second-order derivative is $2\,\mathrm{sgn}(x)$ and is not continuous at $\,x=0$.

$\endgroup$
  • $\begingroup$ One has to be careful with this approach. $\frac{d|x|}{x} = \mathop{\mathrm{sgn}}(x)$ only when $x\neq 0$, unless we extend the definition of derivative. $\endgroup$ – Matthew Leingang Nov 21 '17 at 13:42
  • $\begingroup$ @MatthewLeingang, you're right. Also, "derivative not exist" is not the same thing as "derivative not continuous". That's why I say it's "applied-math". $\endgroup$ – Zhuoran He Nov 21 '17 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.