Now, you didn't do it correctly...you need to subtract the areas of the rectangles that are below thex-axis.

I would suggest using the symmetry of the function (function is even) to simplify your computations, i.e.:

(the even-function rule).

Now you have the interval [0,1) where the function is negative and the interval (1,2] where the function is positive.