4
$\begingroup$

I know I can integrate $|x|$ using the the sign function $\operatorname{sgn}(x)$ as $\int|x|dx=\frac{x^2}{2}\operatorname{sgn}(x)+C$ where $\operatorname{sgn}(x)=\frac{x}{|x|}=\frac{d}{dx}|x|$. But when I differentiate $\frac{x^2}{2}\operatorname{sgn}(x)=\frac{x^3}{2|x|}$ I get

\frac{d}{dx}\frac{x^3}{2|x|}=\frac{3x^2(2|x|)+x^3(2\operatorname{sgn}(x))}{(2|x|)^2}=\frac{6x^2|x|+\frac{2x^4}{|x|}}{4x^2}=\frac{8x^4}{4x^2|x|}=2x\operatorname{sgn}(x)=\frac{2x^2}{|x|}=(2|x|)\frac{|x|}{|x|}$

Which implies 2|x|= |x|$, but we all know $1\ne2$. Where did I go wrong?

2 Answers 2

3

Perhaps $\dfrac{3x^2(2|x|)+x^3(2\operatorname{sgn}(x))}{(2|x|)^2}$ should be $\dfrac{3x^2(2|x|)-x^3(2\operatorname{sgn}(x))}{(2|x|)^2}$?

The quotient rule gives the derivative of $f(x) = \dfrac{g(x)}{h(x)}$ as f'(x) = \dfrac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}.

  • 0
    You're right, I had the quotient rule wrong.2012-03-22
1

We have that the sign function is $1$ for positive numbers and $-1$ for negative ones. So we can define its integral as $x$ for $x>0$ and $-x$ for $x<0$. This means that we can use the absolute value function:

$\int \operatorname{sgn}(x)dx = |x|+C$

Similarily

$\int|x|dx = \frac{x|x|}{2}+C$

If I'm not wrong, we can integrate the sign function $n+1$ times with $\dfrac{x^n|x|}{(n+1)!}+C$