Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

So I was bored and decided to figure out the indefinite integral of the absolute value function, $|x|$. Using integration by parts ($u=|x|, dv=dx$, $dx = \text{sgn}(x)=\frac{|x|}{x}$), it can be shown that $\displaystyle\int |x| dx = \frac{x |x|}{2}+C$.

Now I decided to take the integral again, finding that $\displaystyle\int\left(\int |x| dx \right) dx=\frac{x^2 |x|}{3}+C$. Continuing, I found the pattern in the title, that the $n$th indefinite integral of $|x|$ is $\displaystyle\frac{x^n |x|}{n+1}+C$. Is there a way to prove this general result?

share|improve this question
It's not true. There should be a factorial in the denominator. The correct formula is $\underbrace{\int \ldots \int}_{n} |x| dx = \frac{x^n |x|}{(n+1)!}+p(x)$ for p a polynomial of degree <n. –  George Lowther Oct 9 '10 at 20:11
are you sure? when I took the third integral I got a 4 in the denominator. –  Eugene Bulkin Oct 9 '10 at 20:18
George is right. You need a factorial. I mean, it's almost the same as for $x^n$. –  Rasmus Oct 9 '10 at 20:59
The formula here for an iterated integral might be of interest to you. –  J. M. Oct 9 '10 at 22:51
add comment

3 Answers

up vote 8 down vote accepted

Yes, there is a way: Use Mathematical induction. I don't add more details because I think it's elementary, isn't it?

share|improve this answer
Another easy way would be to (1) compute the derivative of $|x|$, then (2) compute the derivative of $|x|^n$ using the chain rule. –  Ryan Budney Oct 9 '10 at 19:50
not sure why I didn't think of that... I'll try it out and see. –  Eugene Bulkin Oct 9 '10 at 20:20
@Ryan: (1) you can't compute derivative of |x| at 0, (2) I don't see how |x|^n relates to this problem. –  Marek Nov 11 '10 at 20:16
@Marek, it's not clear to me what you're referring to by "can't compute derivative of..." Perhaps you meant to say the derivative does not exist at $0$? This is not relevant to my point. My point is the fundamental theorem of calculus allows you to compute integrals via anti-derivatives. So by computing a derivative you in principle must be computing anti-derivatives. –  Ryan Budney Nov 13 '10 at 18:00
@Ryan: well, if it does not exist then you surely can't compute it, so I think that's pretty relevant to what you said. Also, you didn't address the second point: why |x|^n? –  Marek Nov 13 '10 at 18:13
show 2 more comments

Make the observation that $|x| = \theta(x) x - \theta(-x) x$ for all real $x$, where $\theta$ is the Heaviside function (evaluating to $1$ if the argument is positive and $0$ otherwise). It is known that \begin{eqnarray} \int \theta(x) \ x \ dx = \theta(x) \frac{x^{2}}{2} + C \quad \text{and} \quad \int \theta(-x) \ x \ dx = \theta(-x) \frac{x^{2}}{2} + C^{\prime}, \end{eqnarray} where $C$ and $C^{\prime}$ are constants of integration. The identity for $n = 1$ follows by subtraction and the representation of $|x|$ above. With $n$ integrations, we have \begin{eqnarray} \int \cdots \int |x| \ dx = \theta(x) \int \cdots \int x \ dx - \theta(-x) \int \cdots \int x \ dx = \frac{|x| x^{n}}{(n+1)!} + P_{n}, \end{eqnarray} where $P_{n}$ is a polynomial in $x$, as claimed.

share|improve this answer
I seen this message Heaviside function display to me before in my calculator. I wanted to ask what type of course(s) do they introduce this concept to students in because I have never heard about it yet in class. –  night owl Jun 23 '11 at 9:57
@Night Owl: The Heaviside function $\theta(x)$ is defined in the following way: $\theta(x)$ is $0$ if $x < 0$ and $1$ otherwise. It is most often taught in a course of Differential Equations or Fourier Analysis. –  user02138 Jun 23 '11 at 16:36
add comment

The $C$ in the title of this question should be replaced by an arbitrary polynomial $p(x)$ of degree $\le n-1$. After all, we are talking of an $n$-fold integration here.

share|improve this answer
Your remark is correct, but should be a comment to the question or to my answer. –  Rasmus Oct 9 '10 at 20:01
O.K., but then I didn't have the right to comment. –  Christian Blatter Apr 2 '11 at 8:20
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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