Answer
$\int_{0}^{4} \vert \sqrt{x}-1 \vert~dx = 2$
Work Step by Step
Note that the function $~~\sqrt{x}-1~~$ is negative on the interval $0 \leq x \lt 1$
We can evaluate the integral:
$\int_{0}^{4} \vert \sqrt{x}-1 \vert~dx$
$= \int_{0}^{1} (1-\sqrt{x})~dx+\int_{1}^{4} (\sqrt{x}-1)~dx$
$= (x-\frac{2~x^{3/2}}{3})~\vert_{0}^{1}+ (\frac{2~x^{3/2}}{3}-x)~\vert_{1}^{4}$
$= [(1)-\frac{2(1)^{3/2}}{3}] - [(0)-\frac{2~(0)^{3/2}}{3}]+ [\frac{2~(4)^{3/2}}{3}-(4)] - [\frac{2~(1)^{3/2}}{3}-(1)]$
$= (1-\frac{2}{3})-(0)+ (\frac{16}{3}-4) - (\frac{2}{3}-1)$
$= \frac{1}{3}+\frac{4}{3} +\frac{1}{3}$
$= 2$