>>1474605For the area to be enclosed between the x-axis and y(x), y(x) must intersect the x-axis at the boundaries of the enclosed region. The x-axis is the line where y = 0, so the limits of the enclosed areas are x where y(x) = 0. These roots, {-2, 0, 1}, are trivially found from the first form of y(x).
Because the area should be positive, it is given by the integral of the absolute difference of the enclosing functions. In this case, it is given by the integral of the first region (between -2 and 0), minus the integral of the second region (between 0 and 1), because the second integral is negative. By the fundamental theorem of calculus, the integral between two points is the difference (NB: not the sum) of the antiderivatives at these points.
The steps therefore are:
- find the limits, i.e., the points y(x) = 0, which is easy for a polynomial given in factorised form;
- integrate the regions between the intersections by taking the difference in antiderivative;
- add the absolute value of the integrals for the regions.