You can put this solution on YOUR website! You didn't give limits so I'll make my own.
You can modify the solution as needed. .
So find the area between and .
The four regions are from to to to to
Find the difference of the functions at the midpoints,
So,
Sum the differences and multiply by the step in x ,