Suppose two given curves \(y=f(x)\) and \(y=g(x)\) intersect at \(x=a\) and \(x=b\) and \[f(x)\geq g(x)\quad(a<x<b).\] To find the area of the region bounded between these two curves, consider a vertical rectangle as shown in Figure 1. The height of this rectangle is \(f(x)-g(x)\) and its width is \(dx\). The area of this infinitesimal rectangle is \[dA=[f(x)-g(x)]dx,\] and the total area is \[A=\int_{a}^{b}dA=\int_{a}^{b}[f(x)-g(x)]dx.\]

- Notice that we integrate from the smaller limit \(a\) to the larger one \(b\), and \(f(x)\) is greater than \(g(x)\) in the entire interval of integration; otherwise the integral (and the area) becomes negative which is meaningless.
- Because the curves \(y=f(x)\) and \(y=g(x)\) intersect at \(x=a\) and \(x=b\), they have the same \(y\)-values at these points. If in a problem \(a\) and \(b\) are not given, we can find them from solving the equation \(f(x)=g(x)\).

Sometimes, instead of vertical rectangles, we could or we should consider horizontal rectangles. To find the area of the region bounded by the curves \(x=h(y)\) and \(x=k(y)\) (with \(k(y)\leq h(y)\)) and the horizontal lines \(y=c\) and \(y=d\) (\(c\leq d\)) (Figure 4), we consider horizontal rectangles of length \(h(y)-k(y)\) and width \(dy\). The element of area is then \[dA=[h(y)-k(y)]dy\] and the total area is \[A=\int_{c}^{d}dA=\int_{c}^{d}[h(y)-k(y)]dy.\]

For instance, in the above example, if we use horizontal rectangles, the length of the rectangle is the \(x\) value (in terms of \(y\)) of the right curve (\(x=\sqrt{2y}\)) minus the \(x\) value of the left curve (\(x=-\sqrt{2y})\). Because the width of the rectangle is \(dy\), the element of area is \[\begin{aligned} dA & =\left[\sqrt{2y}-(-\sqrt{2y})\right]\,dy\\ & =2\sqrt{2}\sqrt{y}dy.\end{aligned}\] As the horizontal rectangle sweeps across the region, \(y\) varies between \(0\) and \(2\). Therefore, the total area is \[\begin{aligned} A & =\int_{0}^{2}2\sqrt{2}\sqrt{y}dy\\ & =2\sqrt{2}\int_{0}^{2}y^{1/2}dy\\ & =\frac{2\sqrt{2}}{3/2}\left.y^{3/2}\right|_{y=0}^{y=2}\\ & =\frac{4\sqrt{2}}{3}\sqrt{8}\\ & =\frac{16}{3}.\end{aligned}\]