
Originally Posted by
Prove It
Wrong, what if $\displaystyle \displaystyle x < 0$? It's impossible for $\displaystyle \displaystyle |x(x - 1)|$ to be negative, but $\displaystyle \displaystyle x|x - 1|$ would be.
The general rule is $\displaystyle \displaystyle |AB| = |A||B|$, so $\displaystyle \displaystyle |x(x-1)| = |x||x-1|$.
Anyway, for this integral, you should know that
$\displaystyle \displaystyle \begin{align*}|x^2 - x| &= \begin{cases}x^2 - x\textrm{ if }x^2 - x \geq 0\\x - x^2\textrm{ if }x^2-x<0 \end{cases} \\ &= \begin{cases}x^2 - x\textrm{ if } x \leq 0 \textrm{ or }x \geq 1 \\ x - x^2 \textrm{ if }0 < x < 1\end{cases} \end{align*}$
so that means
$\displaystyle \displaystyle \begin{align*} \int_0^2{|x^2-x|\,dx} &= \int_0^1{|x^2-x|\,dx} + \int_1^2{|x^2-x|\,dx} \\ &= \int_0^1{x - x^2\,dx} + \int_1^2{x^2 - x\,dx} \end{align*}$