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

$$\int_0^6 |x^2 - 6x +8| dx =$$ I know the answer to this problem is $$\frac{44}3$$. But, how do you get that? How does the solution change based on the absolute value? Without the absolute value I got an answer of 12 - I found the anti-derivative:$$\frac{x^3}3-3x^2+8x$$. I then solved it which got me 12. However, this is not the answer to the above problem. What should I be doing?

• Try graphing the function and see where does it take positive/negative values. For instance, begin by checking the roots. – Rick Aug 1 at 17:33

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.

• What is the best way to do that? Finding the roots and checking the values? – Burt Aug 1 at 17:36
• @burt Yes, as in Rick's comment – BallBoy Aug 1 at 17:37

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?

• What is modulus – Burt Aug 1 at 17:37
• @burt It refers to the magnitude $| |$ – Ak19 Aug 1 at 17:37
• @burt "Modulus," "magnitude," and "absolute value" all mean the same thing. – BallBoy Aug 1 at 17:38

If $$f(x)>0$$ on an interval, then $$|f(x)|=f(x)$$ on that interval. If $$f(x)<0$$ on an interval, then $$|f(x)|=-f(x)$$ on that interval. That's basically the actual definition of the absolute value function.

On the interval $$[2,4]$$, $$x^2-6x+8<0$$. Everywhere else it's positive. Thus, your original integral is equivalent to the sum of the following three integrals:

$$\int_{0}^{2}(x^2-6x+8)\,dx+\int_{2}^{4}\left[-(x^2-6x+8)\right]\,dx+\int_{4}^{6}(x^2-6x+8)\,dx.$$

• At $x = 2$ and $x = 4$, $f(x) = 0$. It is not less than $0$. Your definition of absolute value does not account for what happens when $f(x) = 0$. – N. F. Taussig Aug 2 at 8:54
• I said it's basically the definition of the absolute value function. It does not account for what happens at points where the function is zero because it's irrelevant to solving this problem. – Michael Rybkin Aug 2 at 9:05

Let $$F(x):=\frac13 x^3-3x^2+8x$$ so, because $$F^\prime$$ is negative on $$(2,\,4)$$ but positive on $$(0,\,2)\cup(4,\,6)$$, your integral is$$F(2)-F(0)-(F(4)-F(2))+F(6)-F(4)=F(0)+F(6)+2(F(2)-F(4))\\=0+12+2\left(\frac{20}{3}-\frac{16}{3}\right)=\frac{44}{3}.$$