Why are you struggling with this. It is just an integration problem. Are you possibly wondering why you get a negative value? Don't get a negative value. We're looking for an area. That's always positive.
Do it in two pieces. [0,2] and [2,3]
Let's see what you get.