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

7

$\lvert x\rvert$ is partially-differentiable function, since piece-wise notation is more clear and natural for it. By expressing and differentiating it as $\sqrt{x^2}$ you introduce $\sqrt x$ function that is still non-differentiable in point $x=0$. So, writing smooth analytical formulas that work towards disguising the fact of non-differentiable points doesn't introduce any great value.

If you merely don't like piece-wise notation form, then follow the first commenter's note and use $sgn (x)$ representing $\lvert x\rvert'$ for $x\ne0$.