Derivative of $x\cdot|x|$ on $x=0$?

150 Views Asked by At

$$f(x) = x |x|$$

Wolfram Alpha says is:

$$f'(x) = \frac{2x^2}{|x|}$$

and thus $f'(0)$ is indeterminate, while an HP48 says that:

$$f'(x) = |x| + x \operatorname{sgn} x,$$

which would yield $f'(0) = 0$. If I say that:

$$f(x) = -x^2$$

for $x<0$, 0 for $x=0$ and:

$$f(x) = x^2$$

for $x>0$, I kinda think that $f'(0)$ is 0; all three parts' derivatives converge to $0$ on $x=0$, and thus I think that Wolfram is wrong, but I don't really dare say that! (but I don't see any spiky bits on $f(x)$, although it seems clear to me that $f''(0)$ is indeterminate).

(excuse my poor TeX)

edit: according to the answer below, it seems that Wolfram Alpha is wrong- I've already sent them some feedback, but can anyone elaborate on that?

2

There are 2 best solutions below

4
On BEST ANSWER

For $f'(0)$, let's not worry about values of $f'(x)$ near $0$. Let us instead compute directly from the definition of derivative. By definition, $$f'(0)=\lim_{h\to 0}\frac{h|h|-0}{h}=\lim_{h\to 0}|h|=0.$$

1
On

Note that, $|x| = \sqrt{x^2}$.

Now, use the derivation rules (chain and product) and you will see that $ f'(x) = |x| + \dfrac{x^2}{|x|} = \dfrac{2|x|^2}{|x|} = 2|x|$.

Thus, the wolfram is not wrong. We realize that we suppose x nonzero.