The “area under a curve” was defined in Chapter 5 as the area below some curve \(y=f(x)\) and above the \(x\)-axis over some interval. That was a special case of the area between curves, where in general one curve \(y=f_1(x)\) is not necessarily always above another curve \(y=f_2(x)\) over the entire interval, as in Figure [fig:areacurves] for an interval \(\ival{a}{b}\).
The area \(A\) of the region between the curves in Figure [fig:areacurves] cannot be negative. Thus, a typical infinitesimal area element \(\dA\) of the region is of the form \(h(x)\,\dx\), where the height function \(h(x)\) is the nonnegative difference in the \(y\)-coordinates of the curves at each \(x\) in \(\ival{a}{b}\): \(h(x) = \Abs{f_1(x) - f_2(x)}\). Hence:
Example \(\PageIndex{1}\): areacurves1
Add text here.
Solution
Find the area between \(y=e^{x}\) and \(y=e^{-x}\) over \(\ival{0}{2}\).
Solution: Since \(e^x \ge e^{-x}\) for \(x\) in \(\ival{0}{2}\), the height function \(h(x)\) for the region between the curves over \(\ival{0}{2}\) is \(h(x)=\Abs{e^x - e^{-x}}=e^x - e^{-x}\). The area \(A\) of the region is thus
\[\begin{aligned} A ~&=~ \int_0^2 ~(e^x - e^{-x})~\dx\
\[4pt] &=~ e^x + e^{-x}~\Biggr|_0^2 ~=~ e^2 + e^{-2} ~-~ (1 + 1)\\ &=~ 2\,(\cosh\,2 \;-\; 1) ~.\end{aligned} \nonumber \]
Example \(\PageIndex{1}\): areacurves2
Add text here.
Solution
Find the area of the region bounded by \(y=x^2\) and \(y=x\).
Solution: A “bounded” region will always mean a region of finite area, as opposed to unbounded regions. The curves \(y=x^2\) and \(y=x\) intersect at \(x=0\) and \(x=1\), so the region the curves bound is the shaded region shown in the figure on the right. Since \(x \ge x^2\) for \(0 \le x \le 1\), then the height function for the region is \(h(x)=\abs{x^2-x}=x-x^2\). The region’s area \(A\) is then
\[\begin{aligned} A ~&=~ \int_0^1 ~(x - x^2)~\dx\
\[4pt] &=~ \frac{1}{2}\,x - \frac{1}{3}\,x^2~\Biggr|_0^1 ~=~ \frac{1}{2} - \frac{1}{3} ~=~ \frac{1}{6} ~.\end{aligned} \nonumber \]
Example \(\PageIndex{1}\): areacurves3
Add text here.
Solution
Find the area of the region bounded by \(y=\sin\,x\) and \(y=\cos\,x\) over \(\ival{0}{\pi/3}\).
Solution: As shown in the figure on the right, the curves intersect at \(x=\tfrac{\pi}{4}\), and \(\cos\,x \ge \sin\,x\) for \(0 \le x \le \tfrac{\pi}{4}\), while \(\sin\,x \ge \cos\,x\) for \(\tfrac{\pi}{4} \le x \le \tfrac{\pi}{3}\). The area \(A\) of the region thus needs to be split into two integrals:
\[\begin{aligned} A ~&=~ \int_0^{\pi/3}~\abs{\sin\,x \;-\; \cos\,x}~\dx\\ &=~ \int_0^{\pi/4} ~(\cos\,x \;-\; \sin\,x)~\dx ~+~ \int_{\pi/4}^{\pi/3} ~(\sin\,x \;-\; \cos\,x)~\dx\\ &=~ \left(\sin\,x \;+\; \cos\,x~\Biggr|_0^{\pi/4}\right) ~+~ \left(-\cos\,x \;-\; \sin\,x~\Biggr|_{\pi/4}^{\pi/3}\right)\
\[4pt] &=~ \left(\frac{1}{\sqrt{2}} + \frac{1}{\sqrt{2}}\right) ~-~ (0 - 1) ~+~ \left(-\frac{1}{2} - \frac{\sqrt{3}}{2}\right) ~-~ \left(-\frac{1}{\sqrt{2}} - \frac{1}{\sqrt{2}}\right)\
\[4pt] &=~ \frac{4\sqrt{2} - 3 - \sqrt{3}}{2}\end{aligned} \nonumber \]
Formula ([eqn:areacurves]) can be extended to find the area between any number of curves, by splitting the integral over subintervals with different height functions.
Example \(\PageIndex{1}\): areacurves4
Add text here.
Solution
Find the area of the region bounded by \(y=6-x^2\), \(y=x\) and \(y=-5x\) above the \(x\)-axis.
Solution: As shown in the figure on the right, above the \(x\)-axis the curve \(y=6-x^2\) intersects the line \(y=x\) at \(x=2\) and intersects the line \(y=-5x\) at \(x=-1\). Since \(6-x^2 \ge -5x\) over \(\ival{-1}{0}\) and \(6-x^2 \ge x\) over \(\ival{0}{2}\), the area \(A\) of the shaded region needs to be split into two integrals:
\[\begin{aligned} A ~&=~ \int_{-1}^0~\Abs{6 - x^2 - (-5x)}~\dx ~+~ \int_{0}^2~\Abs{6 - x^2 - x}~\dx\\ &=~ \int_{-1}^0~(6 - x^2 + 5x)~\dx ~+~ \int_{0}^2~(6 - x^2 - x)~\dx\\ &=~ \left(6x -\frac{1}{3}x^3 + \frac{5}{2}x^2~\Biggr|_{-1}^{0}\right) ~+~ \left(6x -\frac{1}{3}x^3 - \frac{1}{2}x^2~\Biggr|_{0}^{2}\right)\
\[4pt] &=~ 0 ~-~ \left(-6 + \frac{1}{3} + \frac{5}{2}\right) ~+~ \left(12 - \frac{8}{3} - 2\right) ~-~ 0 ~=~ \frac{21}{2}\end{aligned} \nonumber \]
For some areas between curves it might be easier to switch the roles of \(x\) and \(y\), so that instead of a vertical height function you would use a horizontal width function.
Example \(\PageIndex{1}\): areacurves5
Add text here.
Solution
Find the area of the region bounded by \(x=y^2-2\) and \(y=x\).
Solution: As shown in the figure on the right, the parabola \(x=y^2-2\) intersects the line \(y=x\) at \(x=-1\) and \(x=2\). The region has different height functions \(h(x)\) for \(-2 \le x \le -1\) and \(-1 \le x \le 2\), so that two integrals would be required for the area \(A\). However, notice that the width function \(w(y)\) has one definition over the entire region between the curves \(x=y^2-2\) and \(x=y\): \(w(y) = \Abs{y - (y^2-2)} = y - (y^2 -2)\). Thus, instead of integrating the vertical strips \(\dA = h(x)\,\dx\) along the \(x\)-axis, integrate the horizontal strips \(\dA = w(y)\,\dy\) along the \(y\)-axis, from \(y=-1\) to \(y=2\):
\[\begin{aligned} A ~&=~ \int_{-1}^2~w(y)~\dy ~=~ \int_{-1}^2\Abs{y - (y^2 - 2)}~\dy\\ &=~ \int_{-1}^2 (y - (y^2 - 2))~\dy\\ &=~ \frac{1}{2}y^2 - \frac{1}{3}y^3 + 2y~\Biggr|_{-1}^{2}\
\[4pt] &=~ \left(2 - \frac{8}{3} + 4\right) ~-~ \left(\frac{1}{2} + \frac{1}{3} - 2\right) ~=~ \frac{9}{2}\end{aligned} \nonumber \]
The area between curves given by polar equations can be found similarly. For example, consider curves \(r=r_1(\theta)\) and \(r=r_2(\theta)\) with \(r_1(\theta) \ge r_2(\theta)\) when \(\alpha \le \theta \le \beta\) as in Figure [fig:areacurvespolar]. The area \(A\) of the region between the curves and those angles is simply the difference between the “outer” and “inner” areas, each given by formula ([eqn:polararea]):
\[A ~=~ \int_{\alpha}^{\beta} \tfrac{1}{2}\,r_1^2 \dtheta ~-~ \int_{\alpha}^{\beta} \tfrac{1}{2}\,r_2^2 \dtheta ~=~ \int_{\alpha}^{\beta} \tfrac{1}{2}\,(r_1^2 - r_2^2)~\dtheta \nonumber \]
In general, to include cases where the “outer” and “inner” curves switch positions, take the absolute value of the difference:
Example \(\PageIndex{1}\): areacurves6
Add text here.
Solution
Find the area between \(r=1+\cos\,\theta\) and \(r=1-\cos\,\theta\) for \(\frac{\pi}{6} \le \theta \le \frac{\pi}{3}\).
Solution: Let \(r_1(\theta)=1+\cos\,\theta\) and \(r_2(\theta)=1-\cos\,\theta\). Since \(r_1(\theta) > r_2(\theta)\) for \(\frac{\pi}{6} \le \theta \le \frac{\pi}{3}\), the area \(A\) of the region (shown in the figure on the right) is
\[\begin{aligned} A ~&=~ \int_{\pi/6}^{\pi/3} \tfrac{1}{2}\,\Abs{r_1^2 - r_2^2}~\dtheta ~=~ \int_{\pi/6}^{\pi/3} \tfrac{1}{2}\,((1+\cos\,\theta)^2 - (1-\cos\,\theta)^2)~\dtheta\\ &=~ \int_{\pi/6}^{\pi/3} 2\,\cos\,\theta~\dtheta ~=~ 2\,\sin\,\theta~\Biggr|_{\pi/6}^{\pi/3} ~=~ 2\,\left(\frac{\sqrt{3}}{2} - \frac{1}{2}\right) ~=~ \sqrt{3} \;-\; 1\end{aligned} \nonumber \]
Monte Carlo integration is a technique for approximating the area of a region by taking a large number of random points in a rectangle that encloses the region (see Figure [fig:montecarloarea]). The idea is simple:
\[\frac{\text{\# of points in the region}}{\text{\# of points in the rectangle}} ~\approx~ \frac{\text{area of the region}}{\text{area of the rectangle}} \nonumber \]
For example, if \(20\%\) of the random points in the rectangle fall inside the region, then—by randomness—you would expect the area of the region to be about \(20\%\) of the area of the rectangle. The more random points you take, the better the approximation. Since the area of the rectangle is known, as well as the number of random points inside the region and the rectangle, the area of the region is easy to approximate.
Example \(\PageIndex{1}\): montecarloarea
Add text here.
Solution
Use Monte Carlo integration to approximate the area of the region in the first quadrant above the curves \(y=e^{x^2}\) and \(y=2\,\cos\,x^2\), and inside the circle \(x^2+y^2=9\).
Solution: The region is the shaded area shown in the figure on the right, enclosed in a rectangle of width \(2\) and height \(3\). The area of the rectangle is \(6\), and a point \((x,y)\) in the rectangle is inside the region if only if the following conditions are met:
\[y ~>~ e^{x^2} \quad\text{and}\quad y ~>~ 2\,\cos\,x^2 \quad\text{and}\quad x^2 + y^2 ~<~ 9 \nonumber \]
Notice that these conditions are all in the form of inequalities. The Monte Carlo integration is then simple to perform in Octave, using 10 million random points:
octave> N = 1e7;
octave> x = 2*rand(1,N);
octave> y = 3*rand(1,N);
octave> 6*(sum(y > exp(x.^2) & y > 2*cos(x.^2) & x.^2 + y.^2 < 9))/N
ans = 0.94612
The actual value—accurate to 5 decimal places—is 0.94606.
The rand(1,N) command returns an array of N random numbers between \(0\) and \(1\). So the statement x = 2*rand(1,N) stores N random numbers between \(0\) and \(2\) in an array for the \(x\)-coordinates, and the statement y = 3*rand(1,N) stores N random numbers between \(0\) and \(3\) in an array for the \(y\)-coordinates. The statement y > exp(x.2) returns a value of \(1\) if the condition \(y > e^{x^2}\) is met, \(0\) otherwise. Similarly for the statements y > 2*cos(x.2) and x.2 + y.2 < 9. Joining those three statements with & symbols returns a value of \(1\) if all three conditions are met, \(0\) otherwise. The sum command thus counts how many of the N points are inside the region. Dividing that count by N gives the ratio of points inside the region, then multiplying by \(6\) (the area of the rectangle) gives the approximate area of the region.
Note that the size of the rectangle can affect the approximation—generally the larger the rectangle the more points must be used. Note also in this example that finding the area by using definite integrals would require numerical integration methods, since \(f(x)=e^{x^2}\) and \(f(x)=2\,\cos\,x^2\) cannot be integrated in a closed form. In fact, even finding the points of intersection of the three curves—in order to split the integrals—would require a numerical root-finding method (e.g. Newton’s method).
[sec8dot1]
For Exercises 1-6, find the area of the region bounded by the given curves.
3
\(y = x^2\) and \(y = 2x + 3\)
\(x = -y^2 + 2y\) and \(x = 0\)
\(y = x^2 - 1\) and \(y = x^3 - 1\)
3
\(y = x^4\) and \(y = x\)
\(x = y^2\) and \(x = y + 2\)
\(y = 4 - 4x^2\) and \(y = 1 - x^2\)
Find the area between \(y = 4x - x^2\) and \(y = x\) over \(\ival{0}{4}\).
Find the area between \(y=\cosh\,x\) and \(y=\sinh\,x\) over \(\lival{0}{\infty}\).
Find the area of the region defined by the inequalities \(0 \le x \le y - x \le 1 - y \le 1\).
Find the area between \(r=1+\cos\,\theta\) and \(r=2+2\cos\,\theta\).
Find the area between \(r=1+\cos\,\theta\) and \(r=2+\cos\,\theta\). [[1.]]
Find the area of the region in the first quadrant between the unit hyperbola \(x^2-y^2=1\) and the circle \(x^2+y^2=4\) (i.e. the shaded region shown in the figure on the right) in two ways:
- Integration using formula ([eqn:areacurves]).
- Draw a line segment from the origin \(O\) to the point of intersection
\(P\) on the hyperbola, then use the areas of the resulting circular
sector and hyperbolic sector, without resorting to integration.
Does your answer agree with part (a)? Explain.
[[1.]]
[exer:fourcircles] Find the area common to the four circles of radius 5 shown in Figure [fig:fourcircles]. (Hint: Use symmetry.)
[exer:parabolatriangle] Let \(A\) be the area of the region bounded by the parabola \(y = ax^2\) and the line \(y = mx + b\), where \(a\), \(m\), and \(b\) are positive constants (see Figure [fig:parabolatriangle](a)). Let \(T\) be the area of the triangle \(\triangle\,BCD\), where \(B\) and \(C\) are where the line intersects the parabola, and the point \(D\) on the parabola has the same \(x\)-coordinate as the midpoint of the line segment \(\overline{BC}\) (see Figure [fig:parabolatriangle](b)). Show that \(A = \frac{4}{3}T\).
In Example
Example \(\PageIndex{1}\): montecarloarea
Add text here.
Solution
the region was enclosed in the rectangle \(R = \lbrace\; (x,y):\; 0 \le x \le 2~,~0 \le y \le 3 \;\rbrace\). Use Monte Carlo integration to approximate the area of the region again, using a different enclosing rectangle \(R\):
- \(R = \lbrace\; (x,y):\; 0 \le x \le 2~,~1 \le y \le 3 \;\rbrace\)
- \(R = \lbrace\; (x,y):\; 0 \le x \le 3~,~0 \le y \le 3 \;\rbrace\)
Are the results significantly different than before?
Approximate the area of the region bounded by \(y = x^2\) and \(y = \cos\,x\) in two different ways:
- Use Monte Carlo integration with 10 million points.
- Use a numerical root-finding method to find the points of intersection of the curves, then use those points in a numerical integration method to find the area.
[[1.]]
A dog is chained to a fixed point at the circular base of a cylindrical silo. The silo’s radius is \(50\) ft and the chain can wrap exactly halfway around the silo. How much total area can the dog roam, not counting the area inside the silo?