
## Section6.1Using Definite Integrals to Find Area and Volume

###### Motivating Questions
• How can we use definite integrals to measure the area between two curves?

• How do we decide whether to integrate with respect to $x$ or with respect to $y$ when we try to find the area of a region?

• How can we use a definite integral to find the volume of a three-dimensional solid?

Early on in our work with the definite integral, we learned that for an object moving along an axis, the area under a non-negative velocity function $v$ between $a$ and $b$ tells us the distance the object traveled on that time interval, and that area is given precisely by the definite integral $\int_a^b v(t) \, dt\text{.}$ In general, for any nonnegative function $f$ on an interval $[a,b]\text{,}$ $\int_a^b f(x) \, dx$ measures the area bounded by the curve and the $x$-axis between $x = a$ and $x = b\text{.}$

Next, we will explore how definite integrals can be used to represent other physically important quantities. In Example6.1, we investigate how a single definite integral may be used to represent the area between two curves. Later in this section, we will also investigate how a single definite integral may be used to represent the volume of certain nice 3-dimensional shapes.

###### Example6.1

Consider the functions given by $f(x) = 5-(x-1)^2$ and $g(x) = 4-x\text{.}$

1. Use algebra to find the points where the graphs of $f$ and $g$ intersect.

2. Sketch an accurate graph of $f$ and $g$ on the axes provided, labeling the curves by name and the intersection points with ordered pairs.

3. Find and evaluate exactly an integral expression that represents the area between $y = f(x)$ and the $x$-axis on the interval between the intersection points of $f$ and $g\text{.}$

4. Find and evaluate exactly an integral expression that represents the area between $y = g(x)$ and the $x$-axis on the interval between the intersection points of $f$ and $g\text{.}$

5. What is the exact area between $f$ and $g$ between their intersection points? Why?

Hint
1. Solve the quadratic equation $f(x)=g(x)\text{.}$
2. The graph of $f(x)$ is a parabola, and the graph of $g(x)$ is a line.
3. The area will be $\int_a^b f(x)\, dx$ where $a$ and $b$ are the $x$-coordinates you found in part (a.).
4. The area will be $\int_a^b g(x)\, dx$ where $a$ and $b$ are the $x$-coordinates you found in part (a.).
5. You can find the area between them by subtracting your answer to the previous parts.
1. The intersection points are $(0,4)$ and $(3,1)\text{.}$
2. 12
3. 7.5
4. 4.5
Solution
1. We set $5-(x-1)^2= 4-x$ and solve to get that $0=x^2-3x = x(x-3)\text{,}$ so the intersection points are at $x=0$ and $x=3 \text{.}$ Plugging these into $f(x)$ or $g(x) \text{,}$ we get that the intersection points are $(0,4)$ and $(3,1)\text{.}$
2. The area between a curve and the $x$-axis is the integral of the function between the two $x$-coordinates. Thus our answer is
\begin{equation*} \int_0^3 f(x)\, dx = \int_0^3 5-(x-1)^2 \, dx = \left. 5x - \frac 13 (x-1)^3 \right |_0^3 \\ =\left(15-\frac 83 \right) - \left(0 +\frac 13 \right) = 12 \end{equation*}
3. The area between a curve and the $x$-axis is the integral of the function between the two $x$-coordinates. Thus our answer is
\begin{equation*} \int_0^3 g(x)\, dx = \int_0^3 4-x\, dx = \left. 4x - \frac 12 x^2 \right |_0^3 \\ =\left(12-\frac 92 \right) - \left(0 -0 \right) = 7.5 \end{equation*}
4. The area between $f(x)$ and $g(x)$ is all of the area below $f(x)\text{,}$ but not below $g(x)\text{.}$ To get this, we must take all of the area below $f(x)$ (our answer to part (c.)) and subtract all of the area below $g(x)$ (our answer to part (d.)). That is, our answer is
\begin{equation*} \int_0^3 f(x)\, dx - \int_0^3 g(x)\, dx = 12-7.5 = 4.5 \end{equation*}

### SubsectionThe Area Between Two Curves

In Example6.1, we saw a natural way to think about the area between two curves: it is the area beneath the upper curve minus the area below the lower curve.

###### Example6.3

Find the area bounded between the graphs of $f(x) = (x-1)^2 + 1$ and $g(x) = x+2\text{.}$

Solution

In Figure6.4, we see that the graphs intersect at $(0,2)$ and $(3,5)\text{.}$ We can find these intersection points algebraically by solving the system of equations given by $y = x+2$ and $y = (x-1)^2 + 1\text{:}$ substituting $x+2$ for $y$ in the second equation yields $x+2 = (x-1)^2 + 1\text{,}$ so $x+2 = x^2 - 2x + 1 + 1\text{,}$ and thus

\begin{equation*} x^2 - 3x = x(x-3) = 0\text{,} \end{equation*}

from which it follows that $x = 0$ or $x = 3\text{.}$ Using $y = x+2\text{,}$ we find the corresponding $y$-values of the intersection points.

On the interval $[0,3]\text{,}$ the area beneath $g$ is

\begin{equation*} \int_0^3 (x+2) \, dx = \frac{21}{2}\text{,} \end{equation*}

while the area under $f$ on the same interval is

\begin{equation*} \int_0^3 [(x-1)^2 + 1] \, dx = 6\text{.} \end{equation*}

Thus, the area between the curves is

$$A = \int_0^3 (x+2) \, dx - \int_0^3 [(x-1)^2 + 1] \, dx = \frac{21}{2} - 6 = \frac{9}{2}\text{.}\label{E-DiffOfInt}\tag{6.1}$$

We can also think of the area this way: if we slice up the region between two curves into thin vertical rectangles (in the same spirit as we originally sliced the region between a single curve and the $x$-axis in Section4.2), we see (as shown in Figure6.5) that the height of a typical rectangle is given by the difference between the two functions, $g(x) - f(x)\text{,}$ and its width is $\Delta x\text{.}$ Thus the area of the rectangle is

\begin{equation*} A_{\text{rect} } = (g(x) - f(x)) \Delta x\text{.} \end{equation*}

The area between the two curves on $[0,3]$ is thus approximated by the Riemann sum

\begin{equation*} A \approx \sum_{i=1}^{n} (g(x_i) - f(x_i)) \Delta x\text{,} \end{equation*}

and as we let $n \to \infty\text{,}$ it follows that the area is given by the single definite integral

$$A = \int_0^3 (g(x) - f(x)) \, dx\text{.}\label{E-IntOfDiff}\tag{6.2}$$

We will see this strategy many times in the following sections: take a representative slice, approximate its area in terms of $\Delta x\text{,}$ sum them up, and then take a limit. When we do so, the sum will change to an integral and $\Delta x$ will turn into a $dx\text{.}$ Here, the integral sums the areas of thin rectangles.

Finally, it doesn't matter whether we think of the area between two curves as the difference between the area bounded by the individual curves (as in(6.1)) or as the limit of a Riemann sum of the areas of thin rectangles between the curves (as in(6.2)). These two results are the same, since the difference of two integrals is the integral of the difference:

\begin{equation*} \int_0^3 g(x) \, dx - \int_0^3 f(x) \, dx = \int_0^3 (g(x) - f(x)) \, dx\text{.} \end{equation*}

Our work so far in this section illustrates the following general principle.

###### Area Between Two Curves Using Vertical Slices

If two curves $y = g(x)$ and $y = f(x)$ intersect at $(a,g(a))$ and $(b,g(b))\text{,}$ and $g(x) \ge f(x)$ on the interval $[a,b]\text{,}$ then the area between the curves is

\begin{equation*} A = \int_a^b (g(x) - f(x)) \, dx\text{.} \end{equation*}
###### Example6.6

In each of the following problems, our goal is to determine the area of the region described. For each region, (i) determine the intersection points of the curves, (ii) sketch the region whose area is being found, (iii) draw and label a representative slice, and (iv) state the area of the representative slice. Then, state a definite integral whose value is the exact area of the region, and evaluate the integral to find the numeric value of the region's area.

1. The finite region bounded by $y = \sqrt{x}$ and $y = \frac{1}{4}x\text{.}$

2. The finite region bounded by $y = 12-2x^2$ and $y = x^2 - 8\text{.}$

3. The area bounded by the $y$-axis, $f(x) = \cos(x)\text{,}$ and $g(x) = \sin(x)\text{,}$ where we consider the region formed by the first positive value of $x$ for which $f$ and $g$ intersect.

4. The finite regions between the curves $y = x^3-x$ and $y = x^2\text{.}$

Hint
1. Find where the two curves intersect.

2. Plot both functions and think about how they compare to $y=x^2\text{.}$

3. Remember that $\sin(\pi/4)=\cos(\pi/4)\text{.}$

4. Find three points where the curves intersect and thus two finite regions between two pairs of those points.

1. $A = \int_{0}^{16} (\sqrt{x} - \frac{1}{4}x) \, dx = \frac{32}{3}\text{.}$

2. $A = \int_{-\sqrt{20}/3}^{\sqrt{20}/3} ((12-x^2)-(x^2-8)) \, dx \frac{160 \sqrt{\frac{5}{3}}}{3} \approx 68.853\text{.}$

3. $A = \int_0^\frac{\pi}{4} \left( \cos(x) - \sin(x) \right) dx = \sqrt{2} - 1\text{.}$

4. The left-hand region has area

\begin{equation*} A_1 = \int_{\frac{1 - \sqrt{5}}{2}}^0 \left( x^2 - \left(x^3 - x \right) \right) dx = \dfrac{13 + 5\sqrt{5}}{24} \approx 1.007514\text{.} \end{equation*}

The right-hand region has area

\begin{equation*} A_2 = \int_0^{\frac{1 + \sqrt{5}}{2}} \left( \left(x^3 - x \right) - x^2\right) dx = \dfrac{13 - 5\sqrt{5}}{24} \approx 0.075819\text{.} \end{equation*}
Solution
1. By solving $\sqrt{x}=\frac{1}{4}x\text{,}$ we see that the two curves intersect when $x=0$ and $x=16\text{,}$ so at the points $(0,0)$ and $(16,4)\text{.}$ We can plot the region as shown in the figure below.

Slicing the region with thin vertical rectangles, we see that a typical rectangle's height is given by $\sqrt{x}-\frac{1}{4}x\text{,}$ and thus the area of such a slice is $A_{\text{rect} } = (\sqrt{x} - \frac{1}{4}x) \Delta x\text{.}$ It follows that the area of the region bounded by the two curves is

\begin{equation*} A = \int_{0}^{16} (\sqrt{x} - \frac{1}{4}x) \, dx\text{.} \end{equation*}

Evaluating the integral, we find $A = \frac{32}{3}\text{.}$

2. Solving $12-2x^2=x^2-8\text{,}$ we find that the two curves intersect where $3x^2=2-\text{,}$ so at $x=\pm \sqrt{20/3}\text{.}$ We can plot the region as shown in the figure below.

Slicing the region with thin vertical rectangles, a typical rectangle's height is given by $(12-x^2)-(x^2-8)\text{,}$ and thus the area of such a slice is $A_{\text{rect} } = ((12-x^2)-(x^2-8)) \Delta x\text{.}$ Hence, the area of the region bounded by the two curves is

\begin{equation*} A = \int_{-\sqrt{20}/3}^{\sqrt{20}/3} ((12-x^2)-(x^2-8)) \, dx\text{.} \end{equation*}

Evaluating the integral, we find $A = \frac{160 \sqrt{\frac{5}{3}}}{3} \approx 68.853\text{.}$

3. The first positive value at which the sine and cosine functions intersect is $x=\frac{\pi}{4}\text{.}$ Plotting the functions in a surrounding region, we see the following figure.

Slicing the region with vertical rectangles, we find the area of the shaded region is given by

\begin{equation*} A = \int_0^\frac{\pi}{4} \left( \cos(x) - \sin(x) \right) dx = \sqrt{2} - 1\text{.} \end{equation*}
4. The curves $y = x^3-x$ and $y = x^2$ intersect at three points, forming two regions. Setting $x^3-x=x^2$ and solving, we find that

\begin{equation*} x^3-x^2-x=x(x^2-x-1)=0\text{,} \end{equation*}

which implies that $x=0$ or $x = \frac{1}{2}(1 \pm \sqrt{5})\text{.}$ Plotting the curves, we see that for the left-hand region, the relative interval is $[\frac{1-\sqrt{5}}{2},0]$ and $g(x)=x^3-x \gt x^2 = f(x)\text{.}$

Thus, the left-hand region has area

\begin{equation*} A_1 = \int_{\frac{1 - \sqrt{5}}{2}}^0 \left( x^2 - \left(x^3 - x \right) \right) dx = \dfrac{13 + 5\sqrt{5}}{24} \approx 1.007514\text{.} \end{equation*}

For the right-hand region, the interval is $[0, \frac{1+\sqrt{5}}{2}]$ and $f(x)=x^2 \gt x^3-x = g(x)\text{,}$ so that its area is

\begin{equation*} A_2 = \int_0^{\frac{1 + \sqrt{5}}{2}} \left( \left(x^3 - x \right) - x^2\right) dx = \dfrac{13 - 5\sqrt{5}}{24} \approx 0.075819\text{.} \end{equation*}

### SubsectionFinding Area with Horizontal Slices

At times, the shape of a region may dictate that we use horizontal rectangular slices, instead of vertical ones.

###### Example6.7

Find the area of the region bounded by the parabola $x = y^2 - 1$ and the line $y = x-1\text{,}$ shown at left in Figure6.8.

Solution

By solving the second equation for $x$ and writing $x = y + 1\text{,}$ we find that $y+1 = y^2 - 1\text{.}$ Hence the curves intersect where $y^2 - y - 2 = 0\text{.}$ Thus, we find $y = -1$ or $y = 2\text{,}$ so the intersection points of the two curves are $(0,-1)$ and $(3,2)\text{.}$

If we attempt to use vertical rectangles to slice up the area (as in the center graph of Figure6.8), we see that from $x = -1$ to $x = 0$ the curves that bound the top and bottom of the rectangle are one and the same, which could make the integral difficult. This suggests, as shown in the rightmost graph in the figure, that we try using horizontal rectangles.

Note that the width (horizontal distance) of a horizontal rectangle depends on $y\text{.}$ Between $y = -1$ and $y = 2\text{,}$ the right end of a representative rectangle is determined by the line $x = y+1\text{,}$ and the left end is determined by the parabola, $x = y^2-1\text{.}$ The thickness (vertical distance) of the rectangle is $\Delta y\text{.}$

Therefore, the area of the rectangle is

\begin{equation*} A_{\text{rect} } = [(y+1) - (y^2-1)] \Delta y\text{,} \end{equation*}

and the area between the two curves on the $y$-interval $[-1,2]$ is approximated by the Riemann sum

\begin{equation*} A \approx \sum_{i=1}^{n} [(y_i+1)-(y_i^2-1)] \Delta y\text{.} \end{equation*}

Taking the limit of the Riemann sum, it follows that the area of the region is

$$A = \int_{y=-1}^{y=2} [(y+1) - (y^2-1)] \, dy\text{.}\label{E-IntWRTy}\tag{6.3}$$

We emphasize that we are integrating with respect to $y\text{;}$ this is because we chose to use horizontal rectangles whose widths depend on $y$ and whose thickness is denoted $\Delta y\text{.}$ It is a straightforward exercise to evaluate the integral in Equation(6.3) and find that $A = \frac{9}{2}\text{.}$

Just as with the use of vertical rectangles of thickness $\Delta x\text{,}$ we have a general principle for finding the area between two curves, which we state as follows.

###### Area Between Two Curves Using Horizontal Slices

If two curves $x = g(y)$ and $x = f(y)$ intersect at $(g(c),c)$ and $(g(d),d)\text{,}$ and $g(y) \ge f(y)$ on the interval $[c,d]\text{,}$ then the area between the curves is

\begin{equation*} A = \int_{y=c}^{y=d} (g(y) - f(y)) \, dy\text{.} \end{equation*}
###### Example6.9

In each of the following problems, our goal is to determine the area of the region described. For each region, (i) determine the intersection points of the curves, (ii) sketch the region whose area is being found, (iii) draw and label a representative slice, and (iv) state the area of the representative slice. Then, state a definite integral whose value is the exact area of the region, and evaluate the integral to find the numeric value of the region's area. Note well: At the step where you draw a representative slice, you need to make a choice about whether to slice vertically or horizontally.

1. The finite region bounded by $x=y^2$ and $x=6-2y^2\text{.}$

2. The finite region bounded by $x=1-y^2$ and $x = 2-2y^2\text{.}$

3. The area bounded by the $x$-axis, $y=x^2\text{,}$ and $y=2-x\text{.}$

4. The finite regions between the curves $x=y^2-2y$ and $y=x\text{.}$

Hint
1. Find where the curves intersect and plot them.

2. Observe that horizontal slices are appropriate, so we will integrate with respect to $y \text{.}$

3. Note that the region is approximately triangular with the $x$-axis as the base, $y=x^2$ as the left "side", and $y = 2-x$ as the right side.

4. Plot the region and observe that horizontal slices are appropriate because of the shape of the region.

1. $A = \int_{y=-\sqrt{2}}^{y=\sqrt{2}} (6-2y^2 - y^2) \, dy = 8\sqrt{2} \approx 11.314\text{.}$

2. $A = \int_{y=-1}^{y=1} (2-2y^2-(1-y^2)) \, dy = \frac{4}{3}\text{.}$

3. $A=\int_{y=0}^{y=1} \left((2-y) - \sqrt{y} \right) \, dy = \frac 56$

4. $A = \int_{0}^{3} (y - (y^2 - 2y)) \, dy = \frac{9}{2}\text{.}$

Solution
1. The two curves intersect when $y^2=6-2y^2\text{,}$ which is when $3y^2=6\text{.}$ Solving, they intersect at $y=\pm \sqrt{2}\text{.}$

Plotting the region, we see that for $y=-\sqrt{2}$ to $y=\sqrt{2}\text{,}$ $g(y) = 6-2y^2 \gt y^2 = f(y)\text{,}$ and so horizontal slices are appropriate for setting up the integral that represents the region's area. The area is thus given by

\begin{equation*} A = \int_{y=-\sqrt{2}}^{y=\sqrt{2}} (6-2y^2 - y^2) \, dy = 8\sqrt{2} \approx 11.314\text{.} \end{equation*}
2. The two curves intersect when $1-y^2=2-2y^2\text{,}$ which is when $3y^2=3\text{.}$ Solving, they intersect at $y=\pm 1\text{.}$

Graphing the region, on $-1 \lt y \lt 1\text{,}$ we see that $g(y) = 2-2y^2 \ge 1-y^2 = f(y)\text{.}$ Using horizontal slices, it follows that the region's area is given by

\begin{equation*} A = \int_{y=-1}^{y=1} (2-2y^2-(1-y^2)) \, dy = \int_{y=-1}^{y=1} (1-y^2) \, dy = \frac{4}{3}\text{.} \end{equation*}
3. Standard algebra shows that the two curves meet at $(1,1)\text{.}$

A careful plot of the region shows that the two curves, together with the $x$-axis, form a roughly triangular region with the $x$-axis as the base, $y=x^2$ as the left side, and $y = 2-x$ as the right side. Using horizontal slices, and writing each respective equation with $x$ as a function of $y$ (so $x=\sqrt{y}$ and $x=2-y$), we find that the area of this region is

\begin{equation*} A=\int_{y=0}^{y=1} \left((2-y) - \sqrt{y} \right) \, dy = \\ \left. 2y- \frac12 y^2- \frac 23 y^{3/2} \right|_0^1=\frac 56 \end{equation*}
4. The two curves intersect at $(0,0)$ and $(3,3)\text{.}$

For $0 \le y \le 3\text{,}$ we observe that $g(y)=y \ge y^2-2y = f(y)\text{,}$ so using horizontal slices and the corresponding definite integral, we find that the region's area is

\begin{equation*} A = \int_{0}^{3} (y - (y^2 - 2y)) \, dy = \int_{0}^{3} (3y - y^2) \, dy = \frac{9}{2}\text{.} \end{equation*}

### SubsectionVolume as the Integral of Cross-Sectional Area

So far in this section, we have seen that we could compute the area of a 2D region by slicing it into thin rectangles and then integrating the area of these rectangles. The same principle suggests a method for computing the volume of a 3D shape: slice it into thin cross-sections, and then integrate the volume of the cross-sections. When computing area, this perspective gave us the formula

\begin{equation*} \text{Area}= \int_a^b f(x)\, dx \end{equation*}

where $f(x)\, dx$ is the area of the thin rectangle at $x$ and $a$ and $b$ are the endpoints of the interval. The analogous formula for volume is

\begin{equation*} \text{Volume}= \int_a^b A(x)\, dx \end{equation*}

where $A(x)\, dx$ is the volume of the thin cross-section at $x$ and $a$ and $b$ are the endpoints of the interval. Consider the following example.

###### Example6.10

Consider a circular cone of radius 3 and height 5, which we view horizontally as pictured in Figure6.11. Our goal in this example is to use a definite integral to determine the volume of the cone.

1. Projecting the cone onto the $xy$-plane yields a triangle with vertices $(0,3) \text{,}$ $(0,-3) \text{,}$ and $(5,0) \text{,}$ as shown in Figure6.17. Find a formula for the linear function $y = f(x)$ corresponding to the side of the triangle joining vertices $(0, 3)$ and $(5, 0) \text{.}$

2. For the representative slice of thickness $\Delta x$ that is located horizontally at a location $x$ (somewhere between $x = 0$ and $x = 5$), what is the radius of the representative slice? Note that the radius depends on the value of $x\text{.}$

3. What is the volume of the representative slice you found in (b)?

4. What definite integral will sum the volumes of the thin slices across the full horizontal span of the cone? What is the exact value of this definite integral?

5. Compare the result of your work in (d) to the volume of the cone that comes from using the formula $V_{\text{cone} } = \frac{1}{3} \pi r^2 h\text{.}$

Hint
1. The line passes through the points $(0,3)$ and $(5,0)\text{.}$

3. A cylinder of radius $r$ and height $h$ will have volume $\pi r^2 h \text{,}$ so use the answer you found in part (b.) for the radius.

4. Your answer to part (c.) is the volume of one cylinder, so this will become the integrand (replacing $\Delta x$ with $dx$).

5. The two methods for finding the volume should agree.

1. $f(x)=-\frac 35 x +3 \text{.}$

2. The radius at some $x$ value will be $f(x)=-\frac 35 x +3 \text{.}$

3. \begin{equation*} V_{cylinder}= \pi (-\frac 35 x +3)^2 \Delta x \end{equation*}
4. $15 \pi$

5. The two methods for finding the volume agree: the volume formula for the cone gives $V_{cone} = \frac 13 \pi (3)^2(5) = 15\pi\text{,}$ the same as the integral method.

Solution
1. We are trying to find the formula for a linear function $y=f(x)$ which passes through the points $(0,3)$ and $(5,0)\text{.}$ The $y$-intercept is therefore 3, and the slope is $\frac{0-3}{5-0}= -\frac 35 \text{,}$ so the linear equation is $f(x)=-\frac 35 x +3 \text{.}$

2. The radius at some $x$ value will be $f(x)=-\frac 35 x +3 \text{.}$

3. A cylinder of radius $r$ and height $h$ will have volume $\pi r^2 h \text{.}$ For this cylinder, the radius is $f(x)=-\frac 35 x +3$ and the height is $\Delta x \text{,}$ so the volume of this cylinder is

\begin{equation*} V_{cylinder}= \pi (-\frac 35 x +3)^2 \Delta x \end{equation*}
4. To find the volume of the cone, we will sum up a bunch of cylinders, and take the limit as the width of the cylinders $\Delta x$ goes to 0. When we do this, the sum turns into an integral and $\Delta x$ turns into $dx\text{.}$ Thus the volume of the cone is

\begin{equation*} V_{cone}= \int_0^5 \pi (-\frac 35 x +3)^2 \, dx \\ = \pi \int_0^5 \frac{9}{25} x^2 -\frac {18}{5}x +9 \, dx \\ = \pi \left. \left( \frac{3}{25} x^3 -\frac {9}{5}x^2 +9x \right)\right |_0^5 \\ = \pi \left( \frac{3}{25} (125) -\frac {9}{5} (25) +9(5) \right) - 0 = 15 \pi \end{equation*}
5. The two methods for finding the volume agree: the volume formula for the cone gives $V_{cone} = \frac 13 \pi (3)^2(5) = 15\pi\text{,}$ the same as the integral method.

In Example6.10, we saw that the cross-sections were cylinders with radius $-\frac{3}{5}x + 3 \text{,}$ so the volume of a thin cross section was given by $A(x)\,dx=\pi (-\frac 35 x +3)^2 \, dx\text{,}$ and integrated from $x=0$ to $x=5$ since those corresponded to the top and bottom of the cone.

For 2D shapes it is sometimes more convenient to integrate with respect to $y$ instead of $x\text{.}$ The same is true for 3D shapes: integrals may be taken with respect to $x\text{,}$ $y\text{,}$ or $z\text{.}$ When choosing the variable of integration, priority should be given to variables which result in cross sections with simple shapes, so that the area of the cross sections remains easy to compute and later integrate. For instance, in Example6.10, we integrated with respect to $x$ so that the cross-sections were all circles. If we had taken slices in another direction, the area of a cross-section would have been much more complicated and the integral would have been much harder!

###### Example6.12

Consider a pyramid with a 1-by-1 square base along the $xy$-plane with corners at $(0,0,0), (0,1,0), (1,1,0), (1,0,0)\text{,}$ and tapering up to a point at $(0,0,2)\text{.}$

Notice that every $z$-cross-section (i.e. slice parallel to the $xy$-plane) is a square, so we will want to integrate with respect to $z\text{.}$

1. Slicing the pyramid at a $z$-value (height) between 0 and 2 gives a square shape. Find the linear function $f(z)$ that gives the side-length of this square.

2. Since the $z$-cross-sections are squares, we will want to integrate with respect to $z\text{.}$ Therefore, the volume of the pyramid is

\begin{equation*} \text{Volume} = \int_a^b A(z) dz \end{equation*}

The endpoints $a$ and $b$ represent the $z$-values (heights) where the pyramid starts and stops. What are $a$ and $b\text{?}$

3. Combine your answers to the previous parts to set up a definite integral that represents the volume of the pyramid, then evaluate that integral to find the volume of the pyramid.

4. The volume of a square pyramid is given by the formula $V=\frac 1 3 l^2h$ where $l$ is the side length of the base and $h$ is the height. Use this formula to find the volume of the pyramid and compare to your answer to the previous part.

Hint
1. Use the fact that $f(0)=1$ and $f(2)=0$ to find the linear function.

2. $a$ and $b$ will be the $z$-values at the top and bottom of the pyramid.

3. Use $\text{Volume}=\int_a^b A(z)dz$ and the fact that the area of a square is the side length squared.

1. $f(z)=-\frac 12 z+1 \text{.}$

2. $a=0$ and $b=2 \text{.}$

3. $\frac 23$

4. $\frac 23$

Solution
1. Slicing at $z=0$ gives the base of the pyramid, which is a square of side length 1, so $f(0)=1\text{.}$ Slicing at $z=2$ gives the peak of the pyramid, which can be thought of as a square of side length 0, so $f(2)=0\text{.}$ Therefore the linear function will have intercept $b=1$ and slope $m=\frac{0-1}{2-0}=-\frac 12\text{,}$ so $f(z)=-\frac 12 z+1 \text{.}$

2. We will integrate from the bottom of the pyramid to the top, so from $z=0$ to $z=2 \text{.}$ Thus $a=0$ and $b=2 \text{.}$

3. Since the area of a square is the side length squared, then $A(z)=(-\frac 12 z+1)^2 \text{.}$ Therefore,

\begin{equation*} \text{Volume}=\int_a^b A(z)dz = \int _0^2 (-\frac 12 z+1)^2 dz \\ = \left. \frac 1{12} z^3 -\frac 1 2 z^2 +z \right |_0^2 \\ =(\frac 1 {12} (8)-\frac 1 2(4)+2) -(0)=2/3 \\ \end{equation*}
4. Since our base length is 1 and our height is 2, then the volume is $V=\frac 1 3 l^2h=\frac 1 3 (1)^2(2)=\frac 23 \text{,}$ which is the same as our answer from the integral method.

###### Example6.13

We can use the same technique to find the volume of a sphere of radius 5 centered at the origin $(0,0,0)\text{.}$

1. Since a sphere is symmetrical in all directions, it doesn't matter which direction we slice it. Let's slice perpendicular to the $x$-axis (or, in the $x$-direction) so that the integral will be with respect to $x \text{.}$ Each cross-section will be a circle of radius $r(x)\text{.}$ Use the Pythagorean theorem to find a formula for $r(x)\text{.}$

2. The volume of the sphere is

\begin{equation*} \text{Volume} = \int_a^b A(x)\, dx \end{equation*}

where $A(x)$ is the area of a circular cross-section and $a$ and $b$ represent the $x$-values where the sphere starts and stops. What are $a$ and $b\text{?}$

3. Combine your answers to the previous parts to set up a definite integral that represents the volume of the sphere, then evaluate that integral to find the volume of the sphere.

4. The volume of a sphere is given by the formula $V=\frac 4 3 \pi R^3$ where $R$ is the radius of the sphere. Use this formula to find the volume of the pyramid and compare to your answer to the previous part.

Hint
1. The Pythagorean theorem says that the side lengths of a right triangle are related by $a^2+b^2=c^2\text{.}$ For a cross-section at $x\text{,}$ the side lengths of the right triangle will be $x, r(x),$ and $5\text{.}$

2. What are the leftmost and rightmost points of the sphere along the $x$-axis?

3. Use $\text{Volume} = \int_a^b A(x)\, dx \text{,}$ and the fact that the area of a circle is $\pi r^2\text{.}$

1. $r(x)=\sqrt{25-x^2} \text{.}$

2. $a=-5$ and $b=5 \text{.}$

3. $\pi \frac {500}{3}$

4. $\pi \frac {500}{3}$

Solution
1. Slicing at an $x$-value lets us make a right triangle with hypotenuse 5 and side lengths $x$ and $r(x)\text{,}$ so the Pythagorean theorem tell us that $5^2=x^2+(r(x))^2\text{,}$ and solving for $r(x)$ gives $r(x)=\sqrt{25-x^2} \text{.}$

2. The sphere is centered at the origin and has a radius of 5, so it begins at $x=-5$ and ends at $x=5 \text{.}$ Thus $a=-5$ and $b=5 \text{.}$

3. Since the area of a circle is $\pi r^2 \text{,}$ then $A(x)=\pi (r(x))^2= \pi (25-x^2) \text{.}$ Therefore,

\begin{equation*} \text{Volume}=\int_a^b A(x)dx = \int _{-5}^5 \pi(25-x^2) dx \\ = \left. \pi(25x-\frac 1 3 x^3) \right |_{-5}^5 \\ =\pi(25(5)-\frac 1 3(125))- \pi(25(-5)-\frac 1 3(-125))=\pi \frac {500}{3} \\ \end{equation*}
4. Since our radius is 5, then the volume is $V=\frac 4 3 \pi R^3=\frac 4 3 \pi(5)^3=\pi\frac {500}3 \text{,}$ which is the same as our answer from the integral method.

###### Example6.14

Let $f(x)=x^2+6$ and $g(x)=4x+6\text{.}$ Consider a solid $S$ whose base is the finite region in the $xy$-plane bounded by $y=f(x)$ and $y=g(x)\text{,}$ and whose cross-sections parallel to the $y$-axis are squares. In this example we will find the volume of $S\text{.}$

1. Find the two $x$ values where $f(x)=x^2+6$ and $g(x)=4x+6$ intersect.

2. Consider one of the square cross-sections of $S$ at a particular $x$-value. Find a formula for the side length of this cross-section (in terms of $x$), and then find a formula for $A(x)\text{,}$ the area of this cross-section.

3. Use your answer to the previous parts to find the volume of $S\text{.}$

Hint
1. Solve $f(x)=g(x)\text{.}$

2. The side length will be the distance from the curve $y=g(x)$ to the curve $y=f(x)\text{.}$ The area of a square is its side length squared.

3. Use $\text{Volume}=\int_a^b A(x)dx\text{.}$

1. $x=0,4\text{.}$

2. The side length will be $g(x)-f(x)= 4x-x^2\text{.}$ The area of a cross-section will be $A(x)=(4x-x^2)^2\text{.}$

3. $V= 34 \frac{1}{3}$

Solution
1. We solve $f(x)=g(x)\text{,}$ and straightforward algebra gives that the solutions to $x^2+6=4x+6$ occur at $x=0,4\text{.}$

2. The side length will be $g(x)-f(x)= 4x-x^2\text{.}$ Therefore, the area of a cross-section will be $A(x)=(4x-x^2)^2\text{.}$

3. Since the object begins at $x=0$ and ends at $x=4\text{,}$ we can integrate cross-sectional area to get volume:

\begin{equation*} V=\int_a^b A(x)\, dx = \int_0^4 (4x-x^2)^2\, dx= 34 \frac{1}{3} \end{equation*}
###### Example6.15

In this example, we'll find the volume of the solid whose base is bounded by the curves $y = x^{10} \text{,}$ $y = 1 \text{,}$ and the $y$-axis and whose cross-sections parallel to the $y$-axis are semicircles.

1. Draw the base of the solid in the plane and label the points where the bounding curves intersect.
2. Let $A(x)$ be the area of the vertical cross section of this solid at $x \text{.}$ Write a formula for $A(x) \text{.}$
3. Find the volume of the solid using your answers from parts (a) and (b).
Hint
1. Try using an online graphing calculator like Desmos or Geogebra.
2. The radius of the vertical cross section at $x$ is $\frac{1-x^{10}}{2} \text{.}$
3. The volume is given by a definite integral of the form $\int_{a}^{b} A(x) \, dx \text{.}$
1. $A(x) = \frac{\pi(1-x^{10})^{2}}{8} \text{.}$
2. $\frac{\pi}{8} \cdot \frac{200}{231} \text{.}$
Solution
2. The diameter of the semicircular cross section at $x$ is given by the distance between the curves $y = 1$ and $y = x^{10} \text{,}$ which is $1 - x^{10} \text{.}$ Thus the radius is $\frac{1-x^{10}}{2} \text{.}$ Since the area of a semicircle is $\frac{1}{2}\pi r^{2} \text{,}$ it follows that $A(x) = \frac{1}{2}\pi\left(\frac{1-x^{10}}{2} \right)^{2}=\frac{\pi(1-x^{10})^{2}}{8}.$
3. The volume of the solid is given by an integral $\int_{a}^{b} A(x) \, dx \text{,}$ where the interval $[a,b]$ gives the range of $x$ of the base of the solid. From our graph in part (a), we see that $a = 0$ and $b = 1 \text{.}$ Since $A(x) = \frac{\pi(1-x^{10})^{2}}{8}$ from (b), we may evaluate
\begin{align*} \int_{0}^{1}\frac{\pi(1-x^{10})^{2}}{8} \, dx \amp = \frac{\pi}{8}\int_{0}^{1}(1-x^{10})^{2} \, dx \\ \amp = \frac{\pi}{8}\int_{0}^{1}(1-2x^{10}+x^{20}) \, dx \\ \amp = \frac{\pi}{8} \cdot \frac{200}{231} \end{align*}

### SubsectionSummary

• To find the area between two curves, we think about slicing the region into thin rectangles. If, for instance, the area of a typical rectangle on the interval $x = a$ to $x = b$ is given by $A_{\text{rect} } = (g(x) - f(x)) \Delta x\text{,}$ then the exact area of the region is given by the definite integral

\begin{equation*} A = \int_a^b (g(x)-f(x))\, dx\text{.} \end{equation*}
• The shape of the region usually dictates whether we should use vertical rectangles of thickness $\Delta x$ or horizontal rectangles of thickness $\Delta y\text{.}$ We want the height of the rectangle given by the difference between two curves: if those curves are best thought of as functions of $y\text{,}$ we use horizontal rectangles, whereas if those curves are best viewed as functions of $x\text{,}$ we use vertical rectangles.

• A definite integral may be used to represent the volume of a solid. The idea is to slice the solid into thin shapes whose volume is easy to calculate. The volume of each slice is found by taking the area of the cross-section and multiplying it by the width. Summing up the volumes of the slices and taking the limit as the width $\rightarrow 0$ results in an integral representing the volume.

### SubsectionExercises

Find the exact area of each described region.

1. The finite region between the curves $x = y(y-2)$ and $x=-(y-1)(y-3)\text{.}$

2. The region between the sine and cosine functions on the interval $[\frac{\pi}{4}, \frac{3\pi}{4}]\text{.}$

3. The finite region between $x = y^2 - y - 2$ and $y = 2x-1\text{.}$

4. The finite region between $y = mx$ and $y = x^2-1\text{,}$ where $m$ is a positive constant.

Let $f(x) = 1-x^2$ and $g(x) = ax^2 - a\text{,}$ where $a$ is an unknown positive real number. For what value(s) of $a$ is the area between the curves $f$ and $g$ equal to 2?

Let $f(x) = 2-x^2\text{.}$ Recall that the average value of any continuous function $f$ on an interval $[a,b]$ is given by $\frac{1}{b-a} \int_a^b f(x) \, dx\text{.}$

1. Find the average value of $f(x) = 2-x^2$ on the interval $[0,\sqrt{2}]\text{.}$ Call this value $r\text{.}$

2. Sketch a graph of $y = f(x)$ and $y = r\text{.}$ Find their intersection point(s).

3. Show that on the interval $[0,\sqrt{2}]\text{,}$ the amount of area that lies below $y = f(x)$ and above $y = r$ is equal to the amount of area that lies below $y = r$ and above $y = f(x)\text{.}$

4. Will the result of (c) be true for any continuous function and its average value on any interval? Why?

During an MRI, doctors can produce images of cross-sections of a person's brain. Suppose that during an MRI, a doctor finds that the area of a person's brain visible at a cross-section is given by $A(x)=\frac{625}{4}-\frac{x^4}{4}$ where $A(x)$ is in square centimeters and $x$ is the number of centimeters from the middle of the brain. Find the volume of the person's brain.

Consider a half-cone, meaning a shape whose base is a half-circle tapering up to a peak. Suppose that the base of the half-cone has a radius of $R\text{,}$ and that the peak is $h$ units away from the base.

1. Find a linear formula $r(x)$ for $0 \leq x \leq h$ that gives the radius of the half-circle $x$ units above the base of the half-cone. (Your answer will depend on $R$ and $h\text{.}$)

2. Use your answer to the previous part to set up and evaluate an integral that gives the volume of the half-cone. (You may want to use the fact that a half-circle has area $\frac{\pi}{2}r^2\text{.}$ Your answer will depend on $R$ and $h\text{.}$)