finding area using definite integral

the area between 2 functions in an interval in which or is defined as:

notice that the definition says in which or which means that if the functions cross each other in that interval and the lower function becomes the upper and the upper function becomes the lower then the area cant be calculated using this single formula but we split the interval into multiple and add the results

consider the area in the interval between and the axis ()

we calculate using the formula, i didnt mind the fact that the result should be turned to its absolute value because i know the

consider the area in red between the polynomials

we split the area into 2 because if we tried to find the area without splitting we would be adding a negative value to a positive value whereas the areas should be positive, we wouldnt mind this when working with functions that dont cross because we can always take the absolute value of the result
so we find and and the total area would be , assume , would be the area from and the area from
for we take because

for we take because

therefore

notice that these examples provide you with a plot of the functions so its easier to find the area, in general you wouldnt have the plot and you have to find the intersection points yourself so that you can integrate and find the area, see the following exercise for example

find the area between
first we find the intersection points so that we know how to split the integration

we found that we have intersections at , so we find the integrals in the intervals


area is