Regions with Several Crossings

The rule top minus bottom needs one curve on top for the whole interval. When two curves cross inside the interval, they trade places at each crossing, and the area has to be found in pieces.
The integral of f−gf - g without the absolute value is a signed total. Pieces where gg is on top count as negative, so it's smaller than the area whenever gg is on top somewhere.

A sum of integrals

One integral of the absolute value

With a calculator, the absolute-value form needs no sign analysis. Find the crossings, then integrate ∣f−g∣|f - g| from the first to the last.