12
$\begingroup$

I noticed that if the absolute value definition $\lvert{x}\rvert=\sqrt{x^2}$ is used, we can get derivatives of functions with absolute value, without having to redefine them as piece-wise.

For example, to get the derivative of $f(x)=x\lvert{x}\rvert$ we write $f(x)=x(x^2)^\frac{1}{2}$ and thus

$$ \begin{align} f'(x) &= \sqrt{x^2}+x\frac{1}{2}(x^2)^{-\frac{1}{2}}(2x) \\ &=\sqrt{x^2}+\frac{x^2}{\sqrt{x^2}} \\ &=\frac{2x^2}{\sqrt{x^2}} \\ &=\frac{2x^2}{\lvert{x}\rvert} \\ &=2\lvert{x}\rvert \\ \end{align} $$

which is correct. You just have to avoid using the law of exponents to simplify $\lvert{x}\rvert = (x^2)^\frac{1}{2}=x^{2(\frac{1}{2})}=x$.

My question is, why does using $\lvert{x}\rvert=\sqrt{x^2}$ to get derivatives work, and why does the law of exponents seem to show that $\lvert{x}\rvert=x$ ?

  • 1
    Well, why *shouldn't* differentiating $\sqrt{x^2}$ using the ordinary rules work, as long as you stay away from $x=0$ of course? After all, you are composing perfectly differentiable functions. Though it is somewhat easier to differentiate $\lvert x\rvert$ as $x/\lvert x\rvert$, or $\operatorname{sgn}x$ if you wish.2012-12-04
  • 1
    The problem with the law of exponents there is that the square root function isn't totally well-defined. Every nonzero number has _two_ square roots, a positive one and a negative one; when you say $|x| = \sqrt{x^2}$, you're always taking the positive one; when you say $x = \sqrt{x^2}$, you're taking the one with the same sign as $x$. These issues become a lot more apparent over the complex numbers, where _every_ fractional power involves a choice of 'branch'.2012-12-04

1 Answers 1