[Math] Definite integral of absolute value function

absolute valuedefinite integralsintegration

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?

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{.} $$

Related Question