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 \jamesmerse.comrm{sgn}(x)x~dx=|x|x-\int |x| ~dx$$

since $\frac{d}{dx} |x|=\jamesmerse.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.

You are watching: How to integrate absolute value of x

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


*

You can use $\frac{d(|x|)}{dx}=\frac{x}{|x|}$ and $\int|x|dx = \int \frac{x}{|x|}xdx$.

$\int|x|dx = \int xd(|x|)$, using integration by parts $\int|x|dx = x|x| - \int|x|dx $

$2\int|x|dx = x|x|$

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

$\frac{x}{|x|}$ is a better way to define the sign function.


*

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

Please be sure to answer the question. Provide details and share your research!

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 jamesmerse.comJax to format equations. jamesmerse.comJax reference.

See more: Solved 1) Which Of The Following Does Not Occur During Rna Processing? ?

To learn more, see our tips on writing great answers.


Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy


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


Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.