TExcelTAD
Home › Calculus Essentials › Volumes

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 x=ax = a to x=bx = b and its cross-section at position xx has area A(x)A(x), then a slice of thickness dxdx has volume about A(x) dxA(x)\,dx, and

V=∫abA(x) dxV = \int_a^b A(x)\,dx

Example: a pyramid with a square base of side ss and height hh. At height yy above the base the square has side s(1−y/h)s(1 - y/h), so

V=∫0hs2(1−y/h)2 dy=s2h3V = \int_0^h s^2(1 - y/h)^2\,dy = \frac{s^2h}{3}

which is the familiar "one third of base times height".

Disks: solids of revolution

Spin the region under y=f(x)y = f(x) around the x-axis. Each slice is a disk of radius f(x)f(x), area πf(x)2\pi f(x)^2:

V=π∫abf(x)2 dx(disk method)V = \pi \int_a^b f(x)^2\,dx \qquad \text{(disk method)}

Spinning the line y=(R/h)xy = (R/h)x for 0≤x≤h0 \le x \le h gives a cone; spinning y=r2−x2y = \sqrt{r^2 - x^2} gives a sphere.

python · try it yourself
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 R(x)R(x) and an inner curve r(x)r(x), each slice is a washer (a disk with a hole):

V=π∫ab(R(x)2−r(x)2) dx(washer method)V = \pi \int_a^b (R(x)^2 - r(x)^2)\,dx \qquad \text{(washer method)}

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 xx from the axis, with height h(x)h(x) and width dxdx, sweeps out a shell of volume 2πx⋅h(x)⋅dx2\pi x \cdot h(x) \cdot dx:

V=2π∫abx⋅h(x) dx(shell method)V = 2\pi \int_a^b x \cdot h(x)\,dx \qquad \text{(shell method)}

Both methods on the region between y=xy = x (top) and y=x2y = x^2 (bottom), 0≤x≤10 \le x \le 1:

python · try it yourself
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 A(x) dxA(x)\,dx
Disk solid disk, radius f(x)f(x) πf(x)2 dx\pi f(x)^2\,dx
Washer disk with a hole π(R2−r2) dx\pi (R^2 - r^2)\,dx
Shell thin cylinder at radius xx 2πx h(x) dx2\pi x\, h(x)\,dx

Tip: Draw the slice before writing any formula. The radius of a disk is a distance from the axis of rotation, not necessarily the yy value.

In software: a 3D printer slicer

A slicer program cuts a model into horizontal layers and sums layer area×layer height\text{layer area} \times \text{layer height}. That is a Riemann sum for ∫A(z) dz\int A(z)\,dz. Here it is for a sphere of radius 1:

python · try it yourself
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 ∫A dz\int A\,dz.

Exercises

Exercise 1: A disk solid

Spin the region under y=xy = \sqrt{x}, 0≤x≤40 \le x \le 4, around the x-axis. Find the volume.

Answer

8π≈25.138\pi \approx 25.13

Solution
V=π∫04(x)2 dx=π∫04x dx=π⋅16/2=8πV = \pi \int_0^4 (\sqrt{x})^2\,dx = \pi \int_0^4 x\,dx = \pi \cdot 16/2 = 8\pi

Exercise 2: A washer solid

The region between y=2y = 2 and y=1y = 1 for 0≤x≤30 \le x \le 3 is spun around the x-axis. Find the volume and say what shape it is.

Answer

9π9\pi; a thick-walled tube (a cylinder of radius 2 with a cylindrical hole of radius 1).

Solution
V=π∫03(22−12) dx=π⋅3⋅3=9πcheck: π⋅22⋅3−π⋅12⋅3=12π−3π=9π\begin{aligned} V &= \pi \int_0^3 (2^2 - 1^2)\,dx = \pi \cdot 3 \cdot 3 = 9\pi \\ \text{check: }& \pi \cdot 2^2 \cdot 3 - \pi \cdot 1^2 \cdot 3 = 12\pi - 3\pi = 9\pi \end{aligned}

Exercise 3: Shells

Spin the region under y=4−x2y = 4 - x^2, 0≤x≤20 \le x \le 2, around the y-axis. Find the volume with shells.

Answer

8π8\pi

Solution
V=2π∫02x(4−x2) dx=2π[2x2−x4/4]02=2π(8−4)=8πV = 2\pi \int_0^2 x(4 - x^2)\,dx = 2\pi \Big[2x^2 - x^4/4\Big]_0^2 = 2\pi (8 - 4) = 8\pi
python · try it yourself
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 A(z)=πr(z)2A(z) = \pi r(z)^2.

Answer

About 2.012.01 litres (2010.6 cm32010.6\ \text{cm}^3).

Solution
python · try it yourself
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 y=f(x)y = f(x) on [a,b][a, b] is spun around the x-axis?

  1. ∫f(x) dx\int f(x)\,dx
  2. 2π∫f(x) dx2\pi \int f(x)\,dx
  3. π∫f(x)2 dx\pi \int f(x)^2\,dx
  4. π∫xf(x) dx\pi \int x f(x)\,dx

In the shell method around the y-axis, what is the radius of a shell at position xx?

  1. xx
  2. f(x)f(x)
  3. 2πx2\pi x
  4. dxdx

A 3D-printer slicer adds layer area×layer height\text{layer area} \times \text{layer height}. What is it computing?

  1. A derivative
  2. A Riemann sum for ∫A(z) dz\int A(z)\,dz
  3. A Taylor series
  4. The surface area