# Find the integral $\int_{-2}^{1} |x| d |x|$

To handle the integral $\int_{-2}^{1} |x| d |x|$ I do not see a way to begin with.

If instead I am to compute $\int_{-2}^{1} |x| dx$ then things get easier, for simply computing $\int_{0}^{1} x dx + \int_{0}^{2} x dx$ suffices.

• don't we have $$\int \clubsuit \; d\clubsuit = \dfrac{\clubsuit^2}{2} + C$$ ? Commented Mar 28, 2015 at 3:33
• Yeah, my problem is that I am not sure how to deal with $d|x|$? You mean $d|x|$ doesn ot matter here?
– Yes
Commented Mar 28, 2015 at 3:34
• @Chou Replace $\clubsuit$ with $|x|$ in your calculation. Commented Mar 28, 2015 at 3:35
• Oh? If so then what is the primitive $\int |x| dx$? Thanks.
– Yes
Commented Mar 28, 2015 at 3:37
• @MatthewLevy There is no requirement for being no-decreasing, but you might need bounded-variations (which would mean it is the difference of two non-decreasing functions.) See en.wikipedia.org/wiki/… Commented Mar 28, 2015 at 4:01

$$\int_{-2}^{1}|x|d|x| = \int_{-2}^{0}(-x)d(-x) + \int_{0}^{1}(x)\,d(x) = \int_{-2}^{0}x\,dx + \int_{0}^{1}x\,d x = \int_{-2}^{1} x \,dx$$
$$= \dots\,.$$
• Rather, if you understand what $\int f(x)dg(x)$, a Riemann-Stieljes integral. Commented Mar 28, 2015 at 3:59