Volumes
The same "slice and add" idea that gives areas also gives volumes. Cut a solid into thin slices, find the volume of one slice, and integrate. This lesson covers slicing, the disk and washer methods, and cylindrical shells.
Volume by slicing
If a solid stretches from to and its cross-section at position has area , then a slice of thickness has volume about , and
Example: a pyramid with a square base of side and height . At height above the base the square has side , so
which is the familiar "one third of base times height".
Disks: solids of revolution
Spin the region under around the x-axis. Each slice is a disk of radius , area :
Spinning the line for gives a cone; spinning gives a sphere.
import sympy as sp
x, R, h, r = sp.symbols("x R h r", positive=True)
cone = sp.pi * sp.integrate((R / h * x) ** 2, (x, 0, h))
sphere = sp.pi * sp.integrate(r**2 - x**2, (x, -r, r))
print("cone :", cone)
print("sphere:", sphere)cone : pi*R**2*h/3
sphere: 4*pi*r**3/3
Washers: a hole in the middle
If the region lies between an outer curve and an inner curve , each slice is a washer (a disk with a hole):
Shells: spinning around the other axis
Spinning around the y-axis, it is often easier to use thin cylindrical shells. A vertical strip at distance from the axis, with height and width , sweeps out a shell of volume :
Both methods on the region between (top) and (bottom), :
import sympy as sp
x = sp.symbols("x")
top, bottom = x, x**2
washer_x_axis = sp.pi * sp.integrate(top**2 - bottom**2, (x, 0, 1))
shell_y_axis = 2 * sp.pi * sp.integrate(x * (top - bottom), (x, 0, 1))
print("around the x-axis (washers):", washer_x_axis)
print("around the y-axis (shells) :", shell_y_axis)around the x-axis (washers): 2*pi/15
around the y-axis (shells) : pi/6
| Method | Slice | Volume element |
|---|---|---|
| Slicing | any cross-section | |
| Disk | solid disk, radius | |
| Washer | disk with a hole | |
| Shell | thin cylinder at radius |
Tip: Draw the slice before writing any formula. The radius of a disk is a distance from the axis of rotation, not necessarily the value.
In software: a 3D printer slicer
A slicer program cuts a model into horizontal layers and sums . That is a Riemann sum for . Here it is for a sphere of radius 1:
import math
def slicer_volume(radius, layers):
dz = 2 * radius / layers
total = 0.0
for i in range(layers):
z = -radius + (i + 0.5) * dz # middle of the layer
area = math.pi * (radius**2 - z**2) # circle cross-section
total += area * dz
return total
exact = 4 / 3 * math.pi
for layers in [5, 20, 100, 500]:
v = slicer_volume(1.0, layers)
print(f"{layers:4d} layers: {v:.6f} error {v - exact:+.6f}") 5 layers: 4.272566 error +0.083776
20 layers: 4.194026 error +0.005236
100 layers: 4.189000 error +0.000209
500 layers: 4.188799 error +0.000008
The same idea appears elsewhere: medical imaging estimates organ volumes from CT slices, game engines compute the mass of a mesh for physics from its volume, and voxel engines store a world as small cubes whose count times cube volume approximates .
Exercises
Exercise 1: A disk solid
Spin the region under , , around the x-axis. Find the volume.
Answer
Solution
Exercise 2: A washer solid
The region between and for is spun around the x-axis. Find the volume and say what shape it is.
Answer
; a thick-walled tube (a cylinder of radius 2 with a cylindrical hole of radius 1).
Solution
Exercise 3: Shells
Spin the region under , , around the y-axis. Find the volume with shells.
Answer
Solution
import sympy as sp
x = sp.symbols("x")
print(2 * sp.pi * sp.integrate(x * (4 - x**2), (x, 0, 2)))8*pi
Exercise 4: Vase from measurements
A vase is 30 cm tall. Its inner radius measured every 5 cm from the bottom is [3, 5, 6, 5, 3, 4, 5] cm. Estimate its volume in litres with the trapezoid rule on .
Answer
About litres ().
Solution
import numpy as np
z = np.arange(0, 31, 5)
r = np.array([3, 5, 6, 5, 3, 4, 5])
vol_cm3 = np.trapezoid(np.pi * r**2, z)
print(f"{vol_cm3:.1f} cm³ = {vol_cm3 / 1000:.2f} L")2010.6 cm³ = 2.01 L
Test yourself
Which integral gives the volume when on is spun around the x-axis?
In the shell method around the y-axis, what is the radius of a shell at position ?
A 3D-printer slicer adds . What is it computing?
- A derivative
- A Riemann sum for
- A Taylor series
- The surface area