Definite integral of absolute value function?

51.8k Views Asked by At

In my math textbook I had to compute definite integral which have a absolute value function like these below:

$$\int_{-2}^{3} |x| dx$$

$$\int_{-2}^{3} |x-1| dx$$

$$\int_{-2\pi}^{2\pi} |sin x| dx$$

Should I use additive integration rule to compute them? Or should I assume that absolute value is always positive? Or both? Any suggestion?

2

There are 2 best solutions below

2
On BEST ANSWER

You should use the fact that $|x|$ is one linear function for $x \in (-\infty, 0]$ and a different linear function for $x \in [0,\infty)$ to break the interval of integration into subintervals that are easier. For instance, $$ \int_{-2}^{3} \; |x| \,\mathrm{d}x = \int_{-2}^{0} \; -x \,\mathrm{d}x + \int_{0}^{3} \; x \,\mathrm{d}x \text{.} $$

0
On

There are a couple ways you could approach this that come to mind.

One is to split each integral into multiple, smaller integrals, such as $$\int_{-2}^{0} -x\, dx \quad \text{and}\quad\int_{0}^{3} x\, dx$$ for your first integral. That should make them pretty simple to evaluate.

For the first two integrals, you could also look at the graphs and calculate the area underneath them using simple geometry, but the first method is a little more rigorous and, judging by the answer and comment that have appeared while I've been typing this answer, the more popular way to go.