# How To Integrate Absolute Value Of X ) Dx On The Interval, What Is The Integral Of The Absolute Value Of X

Been searching the net for awhile and everything just comes back about doing the definite integral. So just thought to ask here.

Title says it all. Is there a closed form solution for the indefinite integral \$int |x| dx\$ ?

Using integration by parts

\$\$int |x|~dx=int wtbblue.comrm{sgn}(x)x~dx=|x|x-int |x| ~dx\$\$

since \$frac{d}{dx} |x|=wtbblue.comrm{sgn}(x)\$ on non-zero sets. This yields

\$\$int |x| ~dx = frac{|x|x}{2}~.\$\$

You are looking for a function \$f(x)\$ so that \$\$int_a^b |x|dx=f(b)-f(a).\$\$ This is what is meant by \$int |x|dx\$. I propose that \$f(x)=x|x|/2\$ is such a function. Let us test it. If both \$a\$ and \$b\$ are both positive, then \$\$int_a^b |x|dx=int_a^b x,dx=b^2/2-a^2/2=b|b|/2-a|a|/2=f(b)-f(a).\$\$If \$a\$ and \$b\$ are both negative, then \$\$int_a^b |x|dx=-int_a^b x,dx=-b^2/2-(-a^2/2)=b|b|/2-a|a|/2=f(b)-f(a).\$\$Finally, if \$a and \$b>0\$, we get\$\$int_a^b |x|dx=-int_a^0 x,dx+int_0^b x,dx=b^2/2+a^2/2=b|b|/2-a|a|/2=f(b)-f(a).\$\$Of course, we could have \$b and \$a>0\$, but then we could switch the limits, and this reduces to the third case.

Đang xem: How to integrate absolute value of x

Thus, \$f(x)=x|x|/2\$ is an indefinite integral, or antiderivative of \$|x|\$.

Thanks for contributing an answer to wtbblue.comematics Stack Exchange!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

Use wtbblue.comJax to format equations. wtbblue.comJax reference.

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

How to know whether the solution of an indefinite integral can be written in the form of elementary functions or not?

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.5.14.39313

wtbblue.comematics Stack Exchange works best with JavaScript enabled