# Area between $y=2+|x-1|$ and $y=-\frac{1}{5}x+7$

Question 17, page 448, from Anton 8th. The question asks for the area, and the answer is 24.

Now, I did draw the graph, found the points where both functions touch each other by $f(x) = g(x)$:

(-5,8) and (5,6);

I'm having problems solving the integration. I've tried so many times to solve it, but it comes to the same integral:

$$\int_{-5}^{5}-\frac{1}{5}x+7-2+|x-1|$$ then: $$\int_{-5}^{5}-\frac{1}{5}x+5+|x-1|$$

$$-\frac{x^2}{10} + 5x + |\frac{x^2}{2}-x|$$

Replacing values: 5:

$$-\frac{5^2}{10}+5.5+\frac{5^2}{2}-5 = \color{blue}{-\frac{25}{10}+25+\frac{25}{2}-5 = 30}$$

For -5:

$$-\frac{(-5)^2}{10}+5.(-5)-\frac{(-5)^2}{2}+(-5) = \color{blue}{-\frac{25}{10}-25-\frac{25}{2}-5} = -45$$

then the difference between these:

$$30 - (-45) = 75$$

I can't understand what I'm doing wrong, since the $|\frac{x^2}{2}-x|$ need to behave different on each value, for +5 = $\color{blue}{\frac{5^2}{2}-5}$ and for -5 = $\color{red}{-\frac{(-5)^2}{2}+(-5)}$

I searched by a integration calculator and found this: integral-calculator.com, but I've never seen anything like $$\frac{-(x+1).|x-1|}{2}$$

What am I doing wrong?

Updating with graph picture: • I haven't looked your work but as a general tip, I find these kinds of problems much easier if you draw a picture (so that you know what the proper bounds of integration are). – Zubin Mukerjee Oct 22 '14 at 0:02
• @ZubinMukerjee I've put a image from WinPlot, as I stated, the points are correct so the bounds are -5 and 5. I'm having trouble to solve the integration. – Fabiano Araujo Oct 22 '14 at 0:06

It is not the case that: $$\int |g(x)| \, dx = \left|\int g(x) \, dx\right|$$ Instead, to get rid of the absolute values, we use the fact that: $$|x - 1| = \begin{cases} x - 1 &\text{if } x \geq 1 \\ 1 - x &\text{if } x < 1 \end{cases}$$ We thus split the integral into two separate ones: $$\int_{-5}^1 [(\tfrac{-1}{5}x + 7) - (2 + (1 - x))] \, dx + \int_{1}^5 [(\tfrac{-1}{5}x + 7) - (2 + (x - 1))] \, dx$$
• Well, that was an adventure! Finally! Thank you so much. I was considering the absolute values as $x >= 0$ and $x < 0$. That was confusing everything. – Fabiano Araujo Oct 22 '14 at 0:38