---
title: Volumes by slicing
heading: Stacking thin slices into a solid
eyebrow: A6 · Lesson 12 · Volumes
xp: 40
---

::: hook
How much ferrite is in a toroidal core? How much copper is in a tapered contact, or how much charge is in a cone-shaped region? Each is a volume, and the way to find one is the same idea as area under a curve: slice the solid thinly, find each slice's volume, and add them up with an integral. When the solid is made by spinning a curve around an axis, each slice is a disk and the integral is easy to write down.
:::

::: play
- A cone of radius $R$ and height $h$ is cut into $n$ disks. The staircase is the radius of each disk; the line is the cone's true radius.
- Raise $n$. The disk sum closes in on the exact volume, $\frac{1}{3}\pi R^2h$.
- How many disks do you need to get within 1%?
:::
:::

```sim plot
view: graph
x: x = 0..10 cm
y: r = 0..5 cm
slider: R = 1..5 step 0.5 = 4 cm
slider: h = 4..10 step 0.5 = 8 cm
slider: n = 2..60 step 1 = 6
plot: R*x/h*(1 - step(x - h)) | label: cone radius
plot: R*floor(x*n/h)/n*(1 - step(x - h)) | label: disks | color: ch2
readout: disk sum = pi*R^2*h*(n - 1)*(2*n - 1)/(6*n^2) cm³ | digits: 4
readout: exact volume = pi*R^2*h/3 cm³ | digits: 4
```

::: predict
## A cylinder and a cone have the same radius and height. What fraction of the cylinder's volume does the cone have?

- [ ] $\frac{1}{2}$
- [x] $\frac{1}{3}$
- [ ] $\frac{1}{4}$
- [ ] $\frac{2}{3}$

::: reveal
$\frac{1}{3}$. Each disk's area is $\pi r^2$, and the radius grows in proportion to $x$, so the area grows as $x^2$. The average of $x^2$ over $[0, h]$ is $h^2/3$, a third of its largest value.
:::
:::

::: nameit
## Volume is the integral of cross-sectional area

If a solid's cross-section at position $x$ has area $A(x)$, its volume is

$$V = \int_a^b A(x)\,dx$$

Each slice is a thin slab of volume $A(x)\,dx$.

## Disks

Spin the region under $y = f(x)$ around the $x$ axis. Each slice is a disk of radius $f(x)$:

$$V = \pi\int_a^b f(x)^2\,dx$$

## Washers

If the region lies between an outer curve $R(x)$ and an inner curve $r(x)$, each slice is a washer, a disk with a hole:

$$V = \pi\int_a^b\left(R(x)^2 - r(x)^2\right)dx$$

Square each radius first, then subtract.

## Shells

Spinning around the $y$ axis, it's often easier to slice the region into thin vertical strips. Each strip sweeps out a thin cylindrical shell of radius $x$, height $f(x)$ and thickness $dx$:

$$V = 2\pi\int_a^b x\,f(x)\,dx$$

Choose whichever slicing gives the easier integral.
:::

::: example
## Find the volume of a sphere of radius $R$.

::: solution
1. **Spin a half-disk.** Spin the half-disk under $y = \sqrt{R^2 - x^2}$ around the $x$ axis:
   $$V = \pi\int_{-R}^{R}(R^2 - x^2)\,dx$$
2. **Integrate.**
   $$\begin{aligned} V &= \pi\left[R^2x - \frac{x^3}{3}\right]_{-R}^{R} \\ &= \pi\left(2R^3 - \frac{2R^3}{3}\right) \\ &= \frac{4}{3}\pi R^3 \end{aligned}$$

**Answer:** the sphere's volume is $\frac{4}{3}\pi R^3$.
:::
:::

::: example
## A toroidal core has a circular cross-section of radius $a$ = 0.5 cm, centered 2 cm from the axis. What is its volume?

::: solution
1. **Describe the cross-section.** It's the disk $(x - R)^2 + y^2 \le a^2$ with $R$ = 2 cm, so a strip at radius $x$ has height
   $$2\sqrt{a^2 - (x - R)^2}$$
2. **Add up shells around the axis.**
   $$V = 2\pi\int_{R - a}^{R + a}x \cdot 2\sqrt{a^2 - (x - R)^2}\,dx$$
3. **Substitute $u = x - R$.** The part with $u$ in front is odd and integrates to zero, and what's left is $2\pi R$ times the disk's area:
   $$\begin{aligned} V &= 2\pi R \cdot \pi a^2 \\ &= 2\pi^2Ra^2 \\ &= 2\pi^2 \times 2 \times 0.25 \\ &= 9.87\ \text{cm}^3 \end{aligned}$$
4. **Read the result.** The core's volume is its cross-section times the distance its center travels around the axis.

**Answer:** the core's volume is 9.87 cm³.
:::
:::

::: example
## The curve $y = 1/x$ for $x \ge 1$ is spun around the $x$ axis. Is the volume finite?

::: solution
1. **Find the volume.**
   $$\begin{aligned} V &= \pi\int_1^\infty\frac{dx}{x^2} \\ &= \pi \end{aligned}$$
   which is finite.
2. **Compare the surface area.** It is larger than an integral that diverges:
   $$\begin{aligned} &2\pi\int_1^\infty\frac1x\sqrt{1 + 1/x^4}\,dx \\ &> 2\pi\int_1^\infty\frac{dx}{x} \end{aligned}$$
3. **Interpret.** This "horn" can be filled with paint but not painted: volume and area weight the slices differently.

**Answer:** yes, the volume is finite, exactly $\pi$, even though the surface area is infinite.
:::
:::

::: check
given: R = 2 | 3 | 5; h = 4 | 10
answer: pi*R^2*h/3
unit: cm³
tolerance: 0.5%

## What is the volume, in cm³, of a cone of radius {R} cm and height {h} cm?

::: right
Right. $\pi\int_0^h\left(\frac{Rx}{h}\right)^2dx = \frac{1}{3}\pi R^2h$ = {answer} cm³.
:::

::: misses
- [pi*R^2*h] That's the cylinder. The cone is a third of it.
- [pi*R^2*h/2] The disk areas grow as $x^2$, and the average of $x^2$ is a third of its peak.
- [any] Not yet. Disks of radius $Rx/h$.
:::
:::

::: check
given: a = 2 | 3 | 5
answer: pi*a^2/2
tolerance: 0.5%

## The region under $y = \sqrt{x}$ from 0 to {a} is spun around the $x$ axis. What volume does it sweep out?

::: right
Right. $\pi\int_0^{\given{a}}x\,dx = \frac{\pi a^2}{2}$ = {answer}.
:::

::: misses
- [a^2/2] Include the $\pi$ from each disk's area.
- [pi*2*a^(3/2)/3] Square the radius: the disk area is $\pi(\sqrt x)^2 = \pi x$.
- [any] Not yet. $V = \pi\int f(x)^2dx$.
:::
:::

::: check
given: k = 1 | 2 | 3
answer: 2*pi*k^2/15
tolerance: 0.5%

## The region between $y = \given{k}x$ and $y = \given{k}x^2$ for $0 \le x \le 1$ is spun around the $x$ axis. What volume does it sweep out?

::: right
Right. Washers: $\pi k^2\int_0^1(x^2 - x^4)\,dx = \pi k^2\left(\frac{1}{3} - \frac{1}{5}\right)$ = {answer}.
:::

::: misses
- [pi*k^2/30] That squares the difference of the radii. Square each radius, then subtract.
- [any] Not yet. Outer radius $kx$, inner radius $kx^2$.
:::
:::

::: check
given: c = 2 | 3 | 6
answer: pi*c/6
tolerance: 0.5%

## The region under $y = \given{c}x(1 - x)$ for $0 \le x \le 1$ is spun around the $y$ axis. What volume does it sweep out?

::: right
Right. Shells: $2\pi\int_0^1x \cdot cx(1 - x)\,dx = 2\pi c\left(\frac{1}{3} - \frac{1}{4}\right)$ = {answer}.
:::

::: misses
- [c/12] Include the $2\pi$ from the shell's circumference.
- [pi*c^2/30] That spins it around the $x$ axis. Around the $y$ axis, use shells.
- [any] Not yet. Shells of radius $x$ and height $f(x)$.
:::
:::

::: check
given: R = 2 | 3; a = 0.5 | 1
answer: 2*pi^2*R*a^2
unit: cm³
tolerance: 0.5%

## A toroidal core has a circular cross-section of radius {a} cm, centered {R} cm from the axis. What is its volume, in cm³?

::: right
Right. Cross-section times the path of its center: $\pi a^2 \times 2\pi R$ = {answer}.
:::

::: misses
- [pi*a^2*R] The center travels a full circle, $2\pi R$.
- [any] Not yet. The cross-section's area times the distance its center travels.
:::
:::

::: check
given: R = 1 | 2 | 4
answer: 4*pi*R^3/3
unit: mm³
tolerance: 0.5%

## A sphere of radius {R} mm is sliced into disks. What is its volume, in mm³?

::: right
Right. Disks of radius $\sqrt{R^2 - x^2}$, from $-R$ to $R$, add up to $\frac{4}{3}\pi R^3$ = {answer}.
:::

::: misses
- [4*pi*R^2] That's the surface area.
- [any] Not yet. Disks of radius $\sqrt{R^2 - x^2}$.
:::
:::

::: check
kind: parts
given: a = 1 | 2; b = 3 | 4

## Spin the region under $y = 1/x$ from {a} to {b} around the $x$ axis.

::: part
answer: pi*(1/a - 1/b)
tolerance: 0.5%

### What volume does it make?

::: misses
- [pi*ln(b/a)] Square the radius: the disk area is $\pi/x^2$.
- [any] $\pi\int_a^b\frac{dx}{x^2}$.
:::
:::

::: part
answer: pi/a
tolerance: 0.5%

### What volume would it make out to $x \to \infty$?

::: misses
- [any] Let $b \to \infty$.
:::
:::
:::

::: check
kind: derivation
vars: r = 0.5..3, x = -0.5..0.5

## Derive the volume of a sphere of radius $r$ by disks.

::: step
answer: pi*(r^2 - x^2)

### A slice at $x$ has radius $\sqrt{r^2 - x^2}$. What is its area?
:::

::: step
answer: 4*pi*r^3/3

### Integrate from $-r$ to $r$.
:::

::: right
Right. $\frac43\pi r^3$, by stacking disks.
:::
:::

::: explain
## Why does spinning a region around the $x$ axis give a volume of $\pi\int f(x)^2dx$?

::: model
Slice the solid perpendicular to the axis into thin slabs of thickness $dx$. Each slab is a disk whose radius is the height of the curve there, $f(x)$, so its face has area $\pi f(x)^2$ and its volume is $\pi f(x)^2\,dx$. Adding the slabs from one end to the other, and letting them get thinner, turns the sum into the integral $\pi\int_a^b f(x)^2\,dx$.
:::
:::

::: practice

::: check
given: R = 1 | 3; h = 2 | 5
answer: pi*R^2*h
tolerance: 0.5%

## What is the volume of a cylinder of radius {R} and height {h}, by disks?

::: misses
- [pi*R^2*h/3] That's a cone. A cylinder's disks all have radius $R$.
- [any] $\pi\int_0^h R^2dx$.
:::
:::

::: check
given: a = 0.5 | 1 | 1.5 | 2 | 2.5 | 3
answer: pi*(exp(2*a) - 1)/2
tolerance: 0.5%

## The region under $y = e^x$ from 0 to {a} is spun around the $x$ axis. What volume does it sweep out?

::: misses
- [pi*(exp(a) - 1)] Square the radius: $e^{2x}$.
- [any] $\pi\int_0^a e^{2x}dx$.
:::
:::

::: check
given: R = 2 | 4; r = 1 | 1.5
answer: pi*(R^2 - r^2)*100
unit: mm³
tolerance: 0.5%

## A copper tube 100 mm long has outer radius {R} mm and inner radius {r} mm. What is the copper's volume, in mm³?

::: misses
- [pi*(R - r)^2*100] Square each radius, then subtract.
- [any] Washers with $R$ and $r$.
:::
:::
:::
