# Evaluate the integral. {eq}\displaystyle \int_0^2 \sqrt {|x - 1|}\ dx {/eq}

## Question:

Evaluate the integral.

{eq}\displaystyle \int_0^2 \sqrt {|x - 1|}\ dx {/eq}

## Integral of an Absolute Value Function:

Evaluating definite integrals of absolute value functions is a bit tricky as it does not follow the usual way of evaluating definite integrals by immediately finding antiderivatives and then utilizing the fundamental theorem of calculus. Instead, it first removes the absolute value symbol by affixing the appropriate sign to the function over the right portion of the integral interval.

The absolute value function {eq}|x-1| {/eq} is equal to {eq}x-1 {/eq} when {eq}x-1 \geq 0 \implies x \geq 1 {/eq}.

Otherwise, it is equal to {eq}-(x-1) = -x+1 {/eq}.

The portion of the interval where {eq}x \geq 1 {/eq} is {eq}[1,2] {/eq}, so the integral over that interval will be {eq}\displaystyle \int_1^2 \sqrt {x - 1} \ \mathrm{d}x {/eq}.

Meanwhile, the integral is {eq}\displaystyle \int_0^1 \sqrt {-x + 1} \ \mathrm{d}x {/eq} over the other portion of the interval, giving us:

{eq}\begin{align*} \\ \displaystyle \int_0^2 \sqrt {|x - 1|} \ \mathrm{d}x& =\int_0^1 \sqrt {-x + 1} \ \mathrm{d}x+\int_1^2 \sqrt {x - 1} \ \mathrm{d}x\\\\ & =\left[ - \frac{2(-x+1)^{\frac{3}{2}}}{3} \right]_{0}^{1}+\left[ \frac{2(x-1)^{\frac{3}{2}}}{3} \right]_{1}^{2} \\\\ & =\frac{2}{3}+\frac{2}{3} \\\\ & = \frac{4}{3}\\\\ \end{align*} {/eq}

Therefore, {eq}\displaystyle \int_0^2 \sqrt {|x - 1|} \ \mathrm{d}x= \frac{4}{3} {/eq}.