Find integral of absolute values by splitting integrals, $\int_{-1}^{4} (3-|2-x|)\, dx$ 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.
 A: 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:)
A: Note that $$ \displaystyle\int_{-1}^4 \left( 3 - |2-x| \right) \, \mathrm{d}x = \underbrace{\displaystyle\int_{-1}^4 3 \, \mathrm{d}x}_{=\, 9} - \displaystyle\int_{-1}^4 \left| 2 - x \right| \, \mathrm{d}x. $$I think this could be called splitting the integral, but what I think you mean is how you find $ \displaystyle\int_{-1}^4 \left| 2-x \right| \, \mathrm{d}x $ by splitting. Really, you can find this just by graphing the function $y=|2-x|$ and finding areas. However, I think the following is what you are looking for. 
Note that, if $ x \le 2 $, the integrand is $|2-x|=2-x$ and if $ x \ge 2 $, it is $x-2$. Hence, $$ \begin {align*} \displaystyle\int_{-1}^4 \left|2-x\right| \, \mathrm{d}x &= \displaystyle\int_{-1}^{2} |2-x| \, \mathrm{d}x + \displaystyle\int_2^4 |2-x| \, \mathrm{d}x \\&= \displaystyle\int_{-1}^2 \left( 2 - x \right) \, \mathrm{d}x + \displaystyle\int_2^4 \left( x - 2 \right) \, \mathrm{d}x. \end {align*} $$Can you finish from here? 
A: we have for $$x\geq 2$$ the integral $$\int_{2}^{4}5-xdx$$ and for $$x<2$$ the integral $$\int_{1}^{2}1+xdx$$
A: you could complete what you have started by splitting the integral into three pieces and interpreting each integral as the area of rectangles and triangles:
(a) A = $\int_{-1}^4 3\ dx,$
(b) B = $\int_{-1}^2 | x - 2| \ dx,$
(c) C = $\int_2^4 |x-2| \ dx$
$A = 15=$ the area of a rectangle of base $5$ and height 3.
$B = 9/2 = $ area of an isosceles right triangle of base 3.
$C = 2 = $  area  of an isosceles right triangle of base 2. 
putting all these together $$\int_{-1}^4 3 - |x-2| \ dx = 15 - 9/2 - 2 = 17/2$$
A: You could write like this$$\int_1^4(3-|2-x|)\ dx=\int_{-1}^43\ dx-\int_{-1}^4|2-x|\ dx.$$
Then note that $2-x\ge 0$ when $x\in[-1,2]$ and $2-x\le 0$ when $x\in[2,4]$. So we have
$$\int_{-1}^43\ dx-\left(\int_{-1}^2(2-x)\ dx-\int_2^4(2-x)\ dx\right)$$
Can you take it from here?
