> 
> Calculate the integral $$\int \_ {- 1} ^ {3} \bigl[| x ^ 2-6x | + \text{sgn} (x-2)\bigr]\, \text {d} x .$$
> 
> 
> 

We know that the two functions are defined as follows,
\begin{align\*}
f (x) &= | x ^ 2-6x |\\[5pt]
&=\begin{cases}
x^2-6x, & \text{ if } x^2-6x>0; \\
6x-x^2, & \text{ if } x^2-6x<0. 
\end{cases}\\[5pt]
&=\begin{cases}
x^2-6x, & \text{ if } x\in(-\infty, 0)\cup (6,+\infty); \\ 
6x-x^2, & \text{ if } x\in(0,6). 
\end{cases}.
\end{align\*}
And, $$\text{sgn}(x-2)=\begin{cases}
1, & \text{ if } x>2; \\ 
-1, & \text{ if } x<2. 
\end{cases}$$

I know that the integral gives $ 58 / $ 3. But someone can explain to me the step by step, how to find that result.

I considered doing it with the graph of the function which is the following,
[![enter image description here](https://i.stack.imgur.com/l0aRL.jpg)](https://i.stack.imgur.com/l0aRL.jpg)
Calculating, the area of ​​the triangle on the left from $ -1 $ to $ 0 $, and then calculating the two on the right and adding it, but I don't know how to calculate the area on the right.