# `int_0^2 |2x - 1| dx` Evaluate the integral

### 1 Answer | Add Yours

We have to be careful because of the absolute value. We need to know where the function under absolute values is positive and when it is negative in the given interval. It is also a good idea to sketch the function.

Obviously, the point where the function changes sign is `x=1/2.` Therefore, we have

`int_0^2|2x-1|dx=int_0^(1/2)-(2x-1)dx+int_(1/2)^2 (2x-1)dx=`

`(-(2x^2)/2+x)|_0^(1/2)+((2x^2)/2-x)|_(1/2)^2=`

`-1/4+1/2+0-0+4-2-1/4+1/2=5/2`

` `