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:

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 $$