The area of the region between the curves \(y=f(x)\text{ and }y=g(x)\) and between \(x = a \text{ and } x = b\) is \(A=\int_a^b\lvert f(x)-g(x)\rvert dx.\)
Keep in mind that the term “region between the curves” refers to a bounded region (i.e., to a region that does not extend to infinity).
Instead of the absolute value, if the graphs of the two functions bounding the region do not intersect within \((a, b)\), then
$$A=\int_{x=a}^{x=b}y(x)_{upper}-y(x)_{lower}dx$$
Example. Find the area of the region bounded by the curves \(y =e^x , y=5^x, \text{ and } x = 1.\)
Solution. Sketch the curves and identify the region. Note that the curves intersect at \(x = 0\).
On \([0,1],\) the upper curve is \(y = 5^x\) , and the lower curve is \(y = e^x\) . The area of the region is.
$$\begin{aligned}
\text{A}& =\int_0^1\Bigl(5^x-e^x\Bigr)dx=\biggl(\frac{5^x}{\ln5}-e^x\biggr)\biggr|_0^1 \\
&=\left(\frac{5^1}{\ln5}-e^1\right)-\left(\frac{5^0}{\ln5}-e^0\right)=\frac5{\ln5}-e-\frac1{\ln5}+1 \\
&=\frac4{\ln5}-e+1
\end{aligned}$$
If the region involved looks simpler when the bounding curves are viewed as functions of \(y\), then the analogous formula is used to integrate with respect to \(y\):
$$A=\int_{y=a}^{y=b}x(y)_{right}-x(y)_{left}dy$$
Example. Find the area of the region enclosed by the curves \(y =x^3\) and \(y = x^2\).
Solution. Sketch the area of the region.
To find the points where the curves intersect, combine the two equations:
$$\begin{aligned}x^3&=x^2\\x^3-x^2&=0\\x^2(x-1)&=0\end{aligned}$$
Thus, \(x = 0 \text{ and } x = 1\). The corresponding points are \((0, 0) \text{ and } (1,1)\).
The right curve is \(y=x^3,\mathrm{or~}x=y^{1/3}\) and the right curve is \(y=x^2,\mathrm{or~}x=\sqrt{y}\).
The area of the region is
$$\begin{aligned}
\text{A}& =\int_0^1(y^{1/3}-y^{1/2})dy=\left(\frac34y^{4/3}-\frac23y^{3/2}\right)\Bigg|_0^1 \\
&=\left(\frac34(1)^{4/3}-\frac23(1)^{3/2}\right)-\left(\frac34(0)^{4/3}-\frac23(0)^{3/2}\right)=\frac1{12}
\end{aligned}$$