integration of $\int_0^6 |x^2 - 6x +8| dx$

The absolute value is a function that's very difficult to work with directly. But there's an easy way to deal with it:

$$ |y|=\begin{cases} y &\text{if }y\geq0\\ -y &\text{if }y\leq0\end{cases} $$

So your first step is to find where the term inside the absolute value is positive and where negative. Then you break up the integral into pieces.


If the integrand were given without the absolute value then it would be negative in the interval $(2,4)$ hence the given integral is equal to $$\int_0^2 f(x)\mathrm{d}x-\int_2^4f(x)\mathrm{d}x+\int_4^6f(x)\mathrm{d}x$$ where $f(x)=x^2-6x+8$.


Hint : $x^2-6x+8=(x-4)(x-2)$

Can you break domain $ [0,6]$ to get rid of absolute value notation?