Evaluate integrate |x - 2| dx from 0 to 4

Solution:
Given:
[tex]\int_0^4|x-2|dx[/tex]Split the integral;
[tex]\begin{gathered} \int_0^4|x-2|dx=\int_0^2-(x-2)dx+\int_2^4(x-2)dx \\ ==\int_0^2(-x+2)dx+\int_2^4(x-2)dx \end{gathered}[/tex]Integrating the expression;
[tex]\begin{gathered} =(-\frac{x^2}{2}+2x)|^2_0+(\frac{x^2}{2}-2x)|^4_2 \\ Introducing\text{ the limits;} \\ =[(-\frac{2^2}{2}+2(2))-0]+[(\frac{4^2}{2}-2(4))-(\frac{2^2}{2}-2(2))] \\ =(-2+4)-(0)+(8-8)-(2-4) \\ =2+0+0-(-2) \\ =2+2 \\ =4 \end{gathered}[/tex]Therefore, the answer is 4.
OPTION D is correct.