# How do you evaluate an integral with an absolute value? Question below.

## Dec 9, 2017

${\int}_{0}^{1} \left\mid 2 {x}^{2} + x - 1 \right\mid \cdot \mathrm{dx} = \frac{3}{4}$

#### Explanation:

Once I found roots of integrand,

$2 {x}^{2} + x - 1 = 0$

$\left(2 x - 1\right) \cdot \left(x + 1\right) = 0$

Hence ${x}_{1} = - 1$ and ${x}_{2} = \frac{1}{2}$

Integrand was negative when $- 1 \le x \le \frac{1}{2}$ and positive in other situations.

Consequently,

${\int}_{0}^{1} \left\mid 2 {x}^{2} + x - 1 \right\mid \cdot \mathrm{dx}$

=${\int}_{0}^{\frac{1}{2}} \left(- 2 {x}^{2} - x + 1\right) \cdot \mathrm{dx}$+${\int}_{\frac{1}{2}}^{1} \left(2 {x}^{2} + x - 1\right) \cdot \mathrm{dx}$

$A = {\int}_{0}^{\frac{1}{2}} \left(- 2 {x}^{2} - x + 1\right) \cdot \mathrm{dx}$

=${\left[- \frac{2}{3} {x}^{3} - \frac{1}{2} {x}^{2} + x\right]}_{0}^{\frac{1}{2}}$

=$\left(- \frac{2}{3}\right) \cdot \frac{1}{8} - {\left(\frac{1}{2}\right)}^{3} + \frac{1}{2}$

=$\frac{1}{2} - \frac{1}{8} - \frac{1}{12}$

=$\frac{7}{24}$

$B = {\int}_{\frac{1}{2}}^{1} \left(2 {x}^{2} + x - 1\right) \cdot \mathrm{dx}$

=${\left[\frac{2}{3} {x}^{3} + \frac{1}{2} {x}^{2} - x\right]}_{\frac{1}{2}}^{1}$

=$\frac{2}{3} \cdot \left(1 - \frac{1}{8}\right) + \frac{1}{2} \cdot \left(1 - \frac{1}{4}\right) - \left(1 - \frac{1}{2}\right)$

=$\frac{7}{12} + \frac{3}{8} - \frac{1}{2}$

=$\frac{11}{24}$

Thus,

${\int}_{0}^{1} \left\mid 2 {x}^{2} + x - 1 \right\mid \cdot \mathrm{dx}$

=$A + B$

=$\frac{7}{24} + \frac{11}{24}$

=$\frac{3}{4}$