I am trying to evaluate the integral $\int_{-1}^2 (x-2|x|)\,dx$
I know that this should give me $x^2 /2 - x^2$ for the antiderivative.
I then evaluate at $2$ which gives me $2 - 4 = -2$
Then evaluate at $-1$ and get $\frac{1}{2} - 1 = -\frac{1}{2}$.
Then I find the difference $-2 - \frac{1}{2} = -2.5$
This is wrong and I do not know why.