Finding Volumes with Definite Integrals

You have seen how slicing up a region of the plane bound by functions into thin strips can be used to find the area of that region by taking the limit of the sum of rectangular areas that approximate those strips. However, this strategy can be extended to more things than just finding areas. For example, we can do something remarkably similar for solids whose volume we seek. This time however, we start by slicing up the solid into thin cross-sectional volumes.

Let us first do this with volumes of extruded areas, named after the manufacturing process called extrusion. The below image shows several parts made from this process, which involves the injection of heated metal or plastic through a die. To see beautiful animations of this process, check out the following gifs created by V.Ryan: injection of material, and closeup of die and volume formed

Consider the cylinder, formed by extruding material through a circular die of radius $r$ units, perpendicular to the plane in which that circle exists. Let us suppose the height of the cylinder is $h$. Note that we can position our cylinder relative to the $x$-, $y$-, and $z$-axes of some Euclidean space (a 3-dimensional analog to the Euclidean plane), so that we see the image below, where the center of the cylinder is at the origin, and the direction of extrusion is parallel to the $z$-axis. The positions of a couple points on the cylinder have been marked in the image below as well -- these points will become important momentarily.

Notice the points at the edge of the top circular face are all at height $z=\frac{h}{2}$. Also, because the "area extruded" here was a circle of radius $r$ -- the relationship between the $x$ and $y$ coordinates for points along that edge is given by $x^2 + y^2 = r^2$.

Now, let us slice up this cylinder with cuts parallel to the $yz$-plane and consider the box-shaped approximating cross-sectional volumes that result, as shown. Included on the right side is a better view of the top face of that cylinder (one that purposefully omits $z$-coordinates, as they are all $h$ for this face). For the curious, the red and green points included in each image below are just to help establish orientation.

The volume each contributes is without question the product of its length, width, and height, as each cross-sectional volume is a cuboid (i.e., a fancy term meaning "box").

Similar to how an area bound by curves could be approximated by the sum of the areas of a bunch of thin rectangular strips, we see that the volume of our cylinder can be approximated by the sum of volumes of a bunch of thin cuboids.

In both circumstances, the approximation can be made as close as desired by ensuring either the strips or cuboids were sufficiently "thin".

Note that the "thin dimension" here, given the cuts were made parallel to the $yz$-plane, is one parallel to the $x$-axis, and thus can be expressed as a small difference of $x$-coordinates. Assuming the cuts are uniformly spaced apart (which often makes things simpler), let us denote the common tiny "width" that results by $\Delta x$, to set the stage for the construction of a Riemann sum.

As each cuboid spans from $z=0$ to $z=h$ in terms of the $z$-coordinates, the dimension of each cuboid parallel to that axis -- in this case, the "height" -- is the difference between these two $z$-coordinates (upper minus lower, so as to keep this dimension positive). Thus, the height of each cuboid is then $h - 0 = h$.

Let us refer to the length associated with the edges parallel to the $y$-axis on each cuboid as that cuboid's "length". Since this is expressable as a difference of two $y$-coordinates (rightmost minus leftmost, so as to keep this dimension positive), and remembering that a $\Delta x$ is already on track to appear in our Riemann sum, we solve for $y$ in terms of $x$. We use the aforementioned equation $x^2 + y^2 = r^2$ towards this end, as the points $(x,y)$ involved lie on this circle. Doing so results in two solutions: $y_{right} = \sqrt{r^2-x^2}$ and $y_{left} = -\sqrt{r^2-x^2}$.

Thus, the "length" of the $i^{th}$ cuboid along the $y$-axis can be expressed in terms of some chosen $x_i^*$ in the $i^{th}$ sub-interval as $$y_{right} - y_{left} = \sqrt{r^2-(x_i^*)^2} - \left(-\sqrt{r^2-(x_i^*)^2}\right) = 2\sqrt{r^2-(x_i^*)^2}$$

With the width, length, and height of the $i^{th}$ cuboid established, the volume of the $i^{th}$ cuboid must then be given by $$\textrm{Volume of the } i^{th} \textrm{ cuboid} = h \cdot 2\sqrt{r^2-(x_i^*)^2} \cdot \Delta x$$ Summing the volumes of all the cuboids, we can then express an approximation for the volume of the cylinder as a Riemann sum: $$\textrm{Approximate Cylindrical Volume } = \sum_{i=1}^{n} h \cdot 2\sqrt{r^2-(x_i^*)^2}\,\Delta x$$ To get the exact volume $V_{exact}$, we simply find the limit of the above Riemann sum as the number of rectangles, $n \rightarrow \infty$ (and thus, the limit as $\Delta x \rightarrow 0$). As our $x$ values ranged from $x=-r$ to $x=r$ in the formation of these approximating cuboids, we can express this limit with the definite integral, $$V_{exact} = \int_{-r}^{r} h \cdot 2\sqrt{r^2-x^2}\,dx$$ Noting the symmetry of the circle area relative to the $y$ axis we can simply double the value of the related definite integral from $x=0$ to $x=r$. Then, pulling out the constant multipliers, we have $$V_{exact} = 2 \int_{0}^{r} h \cdot 2\sqrt{r^2-x^2}\,dx = h \cdot \left(4 \int_{0}^{r} \sqrt{r^2-x^2}\,dx\right)$$ Observe that the part in the parentheses is precisely the area of the cylinder's circular base, as previously found to be $A = \pi r^2$ in our brief previous discussion of trigonometric substitution.

As such, the volume of a cylinder of radius $r$ and height $h$ is given by $$V_{exact} = \pi r^2 h$$ This is likely not surprising -- our old geometry teachers probably told us this was the formula to calculate a cylindrical volume. Although we probably had little choice but to just believe them at the time. Now we know this formula is true for sure!

However, more than that just providing that warm fuzzy feeling coming from validating an old claim left unproven for years, the calculations above reveal a larger truth about extruded volumes: their volumes are always just the product of their height and their base areas!


To see this, look back at the picture of our approximated cylinder, notice that the "lengths" (parallel to the $y$-axis) of our cuboid slices can also be interpreted as "lengths" for the rectangular strip areas whose sum approximates the circular base area which was extruded to create the volume. Further, the tiny "width" associated with each cuboid serves also as the tiny "width" associated with each such strip.

Consider the following cuboid approximation to the strange looking base area outlined in blue that has been extruded vertically to a height of $h$. Before continuing, note the top (yellow) area is an area bound between curves. We can approximate this area by first making cuts parallel to the $y$-axis, which results in strips that can be approximated by rectangles. If we make the cuts through the same places on the $x$-axis as we did to make the cuboids (as shown), then these approximating rectangular strips will have the same width and length as their corresponding cuboids. One of these cuboids and the corresponding strip that shares two of its dimensions is shown in red below. Of course, all the cuboids have three dimensions whereas the rectangular strips only have two. This third dimension for the cuboids is of course their constant height, $h$.

 

Assuming the cuboids all have width $\Delta x$ and length $f(x_i^*)$, for some appropriate function $f$ relative to the bounding curves of the base area extruded, then the sum of the cuboid volumes gives us an approximate volume $$\textrm{Approximate volume } = \sum_{i=1}^n h \cdot f(x_i^*) \Delta x$$ while the sum of the rectangular areas approximates the base area $$\textrm{Approximate base area } = \sum_{i=1}^n f(x_i^*) \Delta x$$

‡ : Just to connect this back to the cylinder whose base area was bound by two semicircular curves, notice there we had $f(x) = 2\sqrt{r^2-x^2}$.

Now recall that just as $ab_1 + ab_2 + ab_3 = a(b_1 + b_2 + b_3)$, we can pull the constant factor "$a$" out of the summation $\sum_{i=1}^n ab_i$ to obtain the product, $a \sum_{i=1}^n b_i$. Pulling out the factor of $h$ from the first Riemann sum above, we can clearly see that $$\underbrace{\sum_{i=1}^n h \cdot f(x_i^*) \Delta x}_{\textrm{approx. volume}} = \underbrace{h}_{\textrm{height}} \cdot \underbrace{\left[\sum_{i=1}^n f(x_i^*) \Delta x\right]}_{\textrm{approx. base area}}$$ We know that the expression on the left is the approximated volume -- but look at the expression on the right! The part inside the brackets is precisely the corresponding approximation to the area of the base shape that was extruded to make the volume in question!

Assuming these two approximating Riemann sums involved strips and cuboids spanning over the interval from $x=a$ to $x=b$, then taking a limit as $n \rightarrow \infty$, we can express things in terms of definite integrals: $$\underbrace{\int_{a}^{b} h \cdot f(x)\,dx}_{\textrm{exact volume}} = \underbrace{h}_{\textrm{height}} \cdot \underbrace{\int_{a}^{b} f(x)\,dx}_{\textrm{exact base area, $A_{base}$}}$$

In this way, we know that if we take pretty much any base shape bound by curves whose area, $A$, can be found with a similar definite integral, and extrude it vertically to a height $h$, then the volume of that solid is $V = h \cdot A_{base}$.

Using Extruded Volumes to Approximate Cross-sectional Slices of Other Volumes

Let us take some area and extrude it only by some purposefully small length. Perhaps this extrusion is done vertically. Below we do this for several different such areas.

Suppose we are slicing up some solid whose volume we seek and see thin cross-sectional volumes that aren't easily approximated by by cuboids, but by one of the above thin volumes instead?

Let us reverse this idea a bit. We can define a solid by specifying its cross-sectional areas. Then, if we slice our solid parallel to those areas, we can approximate the volume of our overall solid with a sum of thin cross-sectional volumes that look similar to one of the extruded volumes above.

Note, the "thin" dimension of these cross-sectional volumes will be heights of the corresponding extruded areas. These will typically manifest as either a $\Delta x$, $\Delta y$, or $\Delta z$ in the corresponding Riemann sum, and then as a $dx$, $dy$, or $dz$, respectively, in the corresponding definite integral.

All of this is much easier to see in a concrete example, so let us consider one now...


Suppose we wish to find the volume of a solid that has a circular base and cross-sections, when taken perpendicular to that base in a given direction, that are all equilateral triangles.

Let us position this solid on a set of axes in our standard orientation (i.e., positive $z$-axis pointing up). Let us place its circular base in the $xy$-plane, centered at the origin, and rotate the solid about the $z$ axis as needed until the aforementioned cross sections are parallel to the $xz$-plane.

The above images build up from left to right what this solid must look like. First, on the left we draw the circular base (in blue) and erect a few equilateral triangles upon it to serve as representative cross-sections. Then, in the middle image, we increase the number of cross-sections and extrude each to a triangular prism until it meets the next. When these prisms' extrusion lengths are small, they will well-approximate the true cross-sectional volumes (of the same width and in the same positions) for the overall solid we are building, just like the cuboids in our example at the beginning of this section well-approximated the true corresponding cross-sectional volumes for the cylinder.

This middle image also shows us that an approximation to the the volume of the overall solid described can be found through summing the volumes of these triangular prisms. On the far right, we see the limit of this process as each triangular prism becomes arbitrarily thin, with their union ultimately forming the solid sought.

(Note that this is not a solid for which we have a familiar name -- one might say it looks roughly cone-shaped, but this solid is definitely not a cone, given the sharp curved edge across its top formed by the top vertices of those triangular cross-sections.)

With the solid initially described better visualized now, let us attempt to find its volume...

First, notice that if we look at the base of our solid from below the $xy$-plane, the bottoms of the triangular prisms show up as familiar-looking rectangles in our circular base. In the image below, we draw the base, and show one of these triangle prism bottoms in green. Wanting to focus on a single representative rectangle, we omit drawing the rest, although it should be clear they would align nicely with the horizontal strips shown. (As the image suggests, we assume a regular partition to keep things nice.) In case one wonders why we drew horizontal strips instead of vertical ones, note how in the images of our solid above the faces of our triangular prisms are all perpendicular to the $y$-axis.

The tiny "height" of the rectangle in the picture above, of course, equals the extrustion length of our triangular prisms in the corresponding approximated volume, while the rectangle's length above gives us the length of the edges for the corresponding triangular prism. Note that this height is a small difference of $y$ coordinates, which we can denote with $\Delta y$, while this length is a difference of $x$-coordinates.

Ultimately wanting a Riemann sum that approximates our desired volume and seeing we already have a $\Delta y$, we will want to find this difference in $x$-coordinates in terms of an appropriate $y_i^*$ for the rectangle in question.

As such, we solve for $x$ in the equation of the unit circle centered at the origin (i.e., $x^2 + y^2 = 1$) to find $x = \pm\sqrt{1-y^2}$. The negative $x$ value tells us where the left side of our rectangle is, while the positive $x$ value gives us the right side. Subtracting the smaller from the larger (to ensure the distance found is positive), we have the length of the longer side of the $i^{th}$ rectangle, and thus the length of the triangular sides of our approximating cross-sectional volumes, both equal to $2\sqrt{1-(y_i^*)^2}$.

Recalling that the area of an equalateral triangle of side length $s$ is given by $$\textrm{Area } = \frac{s^2\sqrt{3}}{4}$$ we can then exploit the volume formula for extruded volumes (i.e., base area $\times$ extrusion length) to find the volume contributed by the $i^{th}$ triangular prism, $V_{i}$ $$\begin{array}{rcl} V_i &=& \displaystyle{\frac{\left(2\sqrt{1-(y_i^*)^2}\right)^2\sqrt{3}}{4}}\,\Delta y\\\\ &=& \sqrt{3}\left[1-(y_i^*)^2\right]\,\Delta y \end{array}$$ Summing the volumes of all the prisms (let us suppose there are $n$ of them) gives us a Riemann sum that approximates the volume sought, $V_{approx}$, $$V_{approx} = \sum_{i=1}^n \sqrt{3}\left[1-(y_i^*)^2\right]\,\Delta y$$ Of course, now all we need to do is take a limit as $\Delta y \rightarrow 0$ (or equivalently as $n \rightarrow \infty$) to produce a definite integral that gives us the exact volume. Recall that we created equilateral triangular prism cross-sections from $y=-1$ to $y=1$ (spanning the entire unit circle) -- these become the limits of integration on that definite integral: $$V_{exact} = \int_{-1}^{1} \sqrt{3}(1-y^2)\,dy$$ From here, things are routine. We simply evaluate the integral to find $$\begin{array}{rcl} V_{exact} &=& \displaystyle{\sqrt{3}\int_{-1}^{1} (1-y^2)\,dy}\\ &=& \displaystyle{\sqrt{3} \cdot \left.\left(y -\frac{y^3}{3}\right)\right|_{-1}^1}\\ &=& \displaystyle{\frac{4\sqrt{3}}{3}} \end{array}$$


As another example, suppose we try to deduce the volume of a square pyramid of height $h$ where the sides of the square base are $s$ units long.

First we position the pyramid on a set of axes. Perhaps we again center the base on the origin in the $xy$-plane, as shown on the left below. (Note, other than having a nice symmetry and pointing "to the sky" like the pyramids in Egypt, there is nothing special about the position we have chosen. Any position will work here -- although admittedly, those that keep the square base parallel to either the $xy$, $yz$, or $xz$-planes will be much easier to work with!).

Nicely, if we slice the volume with cuts parallel to the $xy$-plane, we see the cross-sectional volumes can again be approximated by cuboids (specifically, extruded square areas). We draw one of these in red.

Noting first that the "thin" dimension of our representiative red cuboid is some difference of $z$ coordinates $\Delta z$, let us seek to build a Riemann sum for the approximate volume of the pyramid in terms of $z$-values.

We will consequently need to find the contributing volume of each cuboid in terms of $z$ values. The area of the square face of the cuboid (i.e., the one extruded) is of course the square of its edge length.

We can find this edge length in multiple ways. For example, if we draw the intersection of the pyramid with the $yz$-plane as shown on the right, note that the length of the thin red rectangle that results must also be the edge length we seek.

To express this edge length in terms of the $z$-value associated with the cuboid in question, we might first find the equations for the blue lines that bound it on the left and right. (To the extent it helps you understand what these blue lines represent, they are faintly drawn in the left image as well.)

After solving for $y$ in terms of $z$ for each (since we need everything in our Riemann sum in terms of $z$), we subtract the smaller from the larger to find the edge length. As the annotations in the image on the right suggest, $$\textrm{red square edge length } = s - \frac{s}{h}z$$

The volume contributed by the $i^{th}$ extruded square area is, of course, the area of its square face times its thickness: $$\textrm{volume of } i^{th} \textrm{ cuboid } = \left(s - \frac{s}{h}z_i^*\right)^2\,\Delta z$$ Summing the cuboid volumes (assuming there are $n$ of them), we have an approximation for the volume of the square pyramid given by the Riemann sum, $$V_{approx} = \sum_{i=1}^n \left(s - \frac{s}{h}z_i^*\right)^2\,\Delta z$$ Taking a limit as $n \rightarrow \infty$ to obtain the definite integral that gives the exact volume we seek should be routine by now. Just note that the $z$ values for which we have square cross-sections span from $z=0$ to $z=h$, so these become our limits of integration. The resulting integral and the value to which it evaluates are shown below. (The very-straight-forward details of the evaluation of this definite integral we leave to the reader.) $$\begin{array}{rcl} V_{exact} &=& \displaystyle{\int_0^h \left(s - \frac{s}{h}z\right)^2\,dz}\\ &=& \displaystyle{\frac{s^2 h}{3}} \end{array}$$

As a final example, suppose we wish to find the volume of a sphere. Like the cylinder, we can probably anticipate the result given what our old geometry teachers taught us (i.e., $V = \frac{4}{3}\pi r^3$) -- but have you every asked yourself why is the the formula for the volume of a sphere? We are about to find out!

Certainly, the cross-sectional areas created by slicing a sphere in any direction are all circles. Extruding these circular areas to thin cylinders, we see that as these cylinders are made thinner, the sum of their volumes starts to well-approximate the volume of the sphere, as can be seen in the sequence of images below. Lest there be any confusion over what we mean by the "height" of the cylinder, given that all of them are laying on their sides, let us call each of these cylinders a disk of a given radius and thickness.

Let us presume the radius of the sphere is $R$. If this is the case, how much volume does each disk of the approximated sphere actually contribute? Their volumes of course depend on their dimensions. To help us find these dimensions, let us position our sphere on a set of axes in a way that will make our lives as simple as possible.

Let us position the center of our sphere at the origin, but let us orient our axes slightly differently this time -- with the $y$ axis now being the axis that "points up". We could have made this the $z$-axis as we did in the previous example and everything would still work out fine, but this will have the slight advantage of keeping the curve that tracks the top of the sphere from left to right expressible in terms of $x$ and $y$, which may feel more familiar.

You can see that we have highlighted one randomly selected disk in magenta. In the middle image, we cut away a section of the approximated sphere so that we can better see the dimensions of that disk. Notice that doing so reveals various rectangles inside. Let us focus exclusively on those rectangles lying in the $xy$-plane. Note that one can interpret the magenta disk as the volume swept out upon rotating the corresponding magenta rectangle about the $x$-axis. This is true for each disk and its corresponding rectangle, of course.

Given this relationship, the thickness of each disk equals the width of its corresponding rectangle, and the radius of each disk equals the height of its corresponding rectangle.

As such, each disk's thickness can be calculated in the same way as the width of the corresponding rectangle. Noting that the (short) sides of the rectangles whose lengths this width measures are all parallel to the $x$-axis, we can calculate these widths -- and by extension, the thicknesses of the corresponding disks -- as a small difference of $x$-coordinates, $\Delta x$.

Let us denote the radius of the $i^{th}$ disk by $r_i$. Each $r_i$ also then gives the length of the longer side of the $i^{th}$ rectangle. As these sides are all parallel to the $y$-axis, their lengths are thus diffferences of $y$-coordinates. To determine which $y$-coordinates we must subtract, notice how the bottom of each rectangle happens at $y=0$ while the top of each rectangle approximates the height of the semi-circular curve $y=\sqrt{R^2 - x^2}$, as shown in blue in the rightmost image below.

In case there is any confusion as to where that equation for the semi-circular curve came from, note that the blue semi-circle is what we call a "great circle" of the sphere, meaning it has a radius equal to the radius of the sphere, $R$. As such, all points $(x,y)$ on the blue curve are at distance $R$ from the origin. The distance formula allows us to express the same using an equation, namely $\sqrt{x^2 + y^2} = R$. Solving this equation for $y$, we find $y = \sqrt{R^2-x^2}$.

As such, the radius $r_i$ is given by the difference of the two $y$-coordinates just found (larger minus smaller, of course, as we seek a distance, which must always be positive), $$r_i = \sqrt{R^2-(x_i^*)^2} - 0 \quad \textrm{ for some } x_i^* \textrm{ in the $i^{th}$ sub-interval along the $x$-axis}$$

Recalling the volume of a cylinder is given by $$\textrm{Volume } = \textrm{base area } \times \textrm{ height } = (\pi r^2) \cdot h$$ and remembering that the thickness $\Delta x$ is now playing the role of the height $h$ above, and the radius of the $i^{th}$ disk is given by $r_i = \sqrt{R^2-(x_i^*)^2}$, upon substituting these we see the contribution to the approximated volume of the sphere made by the $i^{th}$ disk is $$\begin{array}{rcl} i^{th} \textrm{ disk volume } &=& \pi r_i^2 \cdot \Delta x\\ &=& \displaystyle{\pi \left(\sqrt{R^2-(x_i^*)^2}\right)^2\cdot \Delta x} \end{array}$$ Summing all the disk volumes together then tells us that the approximated volume of the sphere is given by $$\sum_{i=1}^n \pi \left(\sqrt{R^2-(x_i^*)^2}\right)^2 \Delta x$$ However, we aren't really interested in approximating the volume of the sphere -- we want the exact volume. Remember, thinner disks generally provided a better approximation than thicker ones. Also, when the number of disks and/or sub-intervals grows without bounds (at least for regular partitions, like the one involved here), the individual thicknesses shrink and the norm of the partition approaches zero. As such, the exact area will be given by the following limit of a Rieman sum $$\lim_{n \rightarrow \infty} \sum_{i=1}^n \pi \left(\sqrt{R^2-(x_i^*)^2}\right)^2 \Delta x$$ Recognizing that the interval in which our $x_i^*$ values fall is from $-R$ to $R$ on the $x$-axis since the radius of the sphere is $R$ (note the two coordinates given in the earlier image on the right), we can interpret the above limit of a Riemann sum as the following definite integral $$\int_{-R}^{R} \pi \left(\sqrt{R^2 - x^2}\right)^2\,dx$$ From there, we can easily evaluate the definite integral to find the volume of the sphere. Just remember that $R$, the radius of the sphere in question, is a constant here -- the variable of integration is the $x$: $$\begin{array}{rcl} \displaystyle{\int_{-R}^{R} \pi \left(\sqrt{R^2 - x^2}\right)^2\,dx} &=& \displaystyle{\int_{-R}^{R} \pi (R^2 - x^2)\,dx}\\ &=& \displaystyle{\pi \int_{-R}^{R} (R^2 - x^2)\,dx}\\ &=& \displaystyle{\pi \left.\left(R^2 x - \frac{x^3}{3}\right)\right|_{-R}^{R}}\\ &=& \displaystyle{\pi \left[\left(R^3 - \frac{R^3}{3}\right) - \left(-R^3 + \frac{R^3}{3}\right)\right]}\\ &=& \displaystyle{\frac{4}{3}\pi R^3} \end{array}$$

In this way, we have proven the formula for the volume of a sphere of radius $R$ really is $V_{sphere} = \frac{4}{3}\pi R^3$, just like our old geometry teachers claimed!