Answer
$$
\int_{-1}^{2}(x-2|x|) d x =-3.5
$$
Work Step by Step
$$
\int_{-1}^{2}(x-2|x|) d x
$$
Since the graph of y=x is negative for $x<0$, and positive for $x \gt 0$ we must split this integral into two parts to assure that we are getting the absolute value of $x$. So, the given integral can be written as follows:
$$\begin{aligned}
\int_{-1}^{2}(x-2|x|) d x &=\int_{-1}^{0}[x-2(-x)] d x+\int_{0}^{2}[x-2(x)] d x \\
&=\int_{-1}^{0} 3 x d x+\int_{0}^{2}(-x) d x \\
&=3\left[\frac{1}{2} x^{2}\right]_{-1}^{0}-\left[\frac{1}{2} x^{2}\right]_{0}^{2} \\
&=3\left(0-\frac{1}{2}\right)-(2-0)\\
&=-\frac{7}{2} \\
&=-3.5
\end{aligned}$$