[Math] Find integral of absolute values by splitting integrals, $\int_{-1}^{4} (3-|2-x|)\, dx$

absolute valuecalculusdefinite integralsintegration

I have trouble splitting the integral $$\int_{-1}^{6} (5-|2-x|)\, dx$$

Tried so far:

Split the 3 and the absolute value to two separate integrals. Draw absolute value graph. Integrate both. I think algebra may be the problem.

Best Answer

Hint. You may write $$ \begin{align} \int_{-1}^4 (3-|2-x|)\, dx &=\int_{-1}^2 (3-|2-x|)\, dx+\int_2^4 (3-|2-x|)\, dx\\\\ &=\int_{-1}^2 (3-(2-x))\, dx+\int_2^4 (3-(-(2-x)))\, dx \\\\ &=\int_{-1}^2 (1+x)\, dx+\int_2^4 (5-x)\, dx \\\\ &= ... \end{align} $$ where we have used $$ |u| = \begin{cases} -u, & \text{if $u \leq 0$} \\ u, & \text{if $u \geq 0$.} \end{cases} $$ I think you can take it from here.

Addendum: I've change the lower bound, as you changed it:)

Related Question