The change of variables
Before you start: read triple integrals first.
\[x = r\sin\theta\cos\phi, \quad y = r\sin\theta\sin\phi, \quad z = r\cos\theta\]
\[dx\,dy\,dz = r^2\sin\theta\,dr\,d\theta\,d\phi\]
with \(r \ge 0\), \(0 \le \theta \le \pi\), \(0 \le \phi \le 2\pi\), and \(x^2 + y^2 + z^2 = r^2\).
A note on letters. Most Indian textbooks use \(\theta\) for the angle from the \(z\)-axis and \(\phi\) for the angle around it, as here. Some books swap them. Always check which angle runs from 0 to \(\pi\).
The idea in one picture
| Region | Limits |
|---|---|
| Sphere \(x^2 + y^2 + z^2 \le a^2\) | \(0 \le r \le a\), \(0 \le \theta \le \pi\), \(0 \le \phi \le 2\pi\) |
| Upper hemisphere (\(z \ge 0\)) | \(0 \le \theta \le \tfrac{\pi}{2}\) |
| First octant of the sphere | \(0 \le \theta \le \tfrac{\pi}{2}\), \(0 \le \phi \le \tfrac{\pi}{2}\) |
Solved examples
Example 1: Volume of a sphere
EasyFind the volume of a sphere of radius \(a\).
- \(\displaystyle\int_0^{2\pi}\!\!\int_0^\pi\!\!\int_0^a r^2\sin\theta\,dr\,d\theta\,d\phi = \frac{a^3}{3}\cdot 2\cdot 2\pi\).
Answer\(\dfrac{4}{3}\pi a^3\)
Example 2: Over the unit sphere
EasyEvaluate \(\displaystyle\iiint (x^2 + y^2 + z^2)\,dV\) over \(x^2 + y^2 + z^2 \le 1\).
- \(\displaystyle\int_0^{2\pi}\!\!\int_0^\pi\!\!\int_0^1 r^2\cdot r^2\sin\theta\,dr\,d\theta\,d\phi = \frac{1}{5}\cdot 2\cdot 2\pi\).
Answer\(\dfrac{4\pi}{5}\)
Example 3: First octant
MediumEvaluate \(\displaystyle\int_0^1\!\!\int_0^{\sqrt{1 - x^2}}\!\!\int_0^{\sqrt{1 - x^2 - y^2}} xyz\,dz\,dy\,dx\).
- The limits describe the first octant of the unit sphere.
- \(xyz = r^3\sin^2\theta\cos\theta\sin\phi\cos\phi\). With \(dV\): \(r^5\sin^3\theta\cos\theta\,\sin\phi\cos\phi\).
- \(\displaystyle\int_0^1 r^5\,dr\cdot\int_0^{\pi/2}\sin^3\theta\cos\theta\,d\theta\cdot\int_0^{\pi/2}\sin\phi\cos\phi\,d\phi = \frac{1}{6}\cdot\frac{1}{4}\cdot\frac{1}{2}\).
Answer\(\dfrac{1}{48}\)
Example 4: Over a hemisphere
MediumEvaluate \(\displaystyle\iiint z^2\,dV\) over the hemisphere \(x^2 + y^2 + z^2 \le a^2\), \(z \ge 0\).
- \(z^2 = r^2\cos^2\theta\): \(\displaystyle\int_0^{2\pi}\!\!\int_0^{\pi/2}\!\!\int_0^a r^4\cos^2\theta\sin\theta\,dr\,d\theta\,d\phi = \frac{a^5}{5}\cdot\frac{1}{3}\cdot 2\pi\).
Answer\(\dfrac{2\pi a^5}{15}\)
Example 5: All of space
Exam levelEvaluate \(\displaystyle\iiint_{\mathbb R^3}\frac{dx\,dy\,dz}{(1 + x^2 + y^2 + z^2)^2}\).
- \(\displaystyle 4\pi\int_0^\infty\frac{r^2}{(1 + r^2)^2}\,dr\) (the angles give \(2\cdot 2\pi = 4\pi\)).
- Put \(r = \tan t\): \(\displaystyle\int_0^{\pi/2}\sin^2 t\,dt = \frac{\pi}{4}\).
Answer\(\pi^2\)
Write \(r^2\sin\theta\) next to \(dr\,d\theta\,d\phi\) immediately. Like the \(r\) in polar coordinates, it's the factor students most often forget.
Common mistakes
1. Forgetting \(r^2\sin\theta\)
Without it, the volume of a sphere comes out wrong; check your set-up against \(\tfrac{4}{3}\pi a^3\).
2. Running \(\theta\) from 0 to \(2\pi\)
The angle from the \(z\)-axis only goes from 0 to \(\pi\). Going to \(2\pi\) double-counts.
3. Mixing up which angle is which
Check your book's convention: the angle whose \(\cos\) gives \(z\) is the one from 0 to \(\pi\).
Practice questions
Q1Volume of a hemisphere of radius \(a\).
\(\dfrac{2}{3}\pi a^3\).
Q2\(\displaystyle\iiint e^{(x^2 + y^2 + z^2)^{3/2}}\,dV\) over the unit sphere
\(\displaystyle 4\pi\int_0^1 e^{r^3}r^2\,dr = \frac{4\pi(e - 1)}{3}\).
Q3\(\displaystyle\iiint (x^2 + y^2 + z^2)\,dV\) over the first octant of the unit sphere
One eighth of Example 2: \(\dfrac{\pi}{10}\).
Q4\(\displaystyle\iiint z^2\,dV\) over the whole sphere of radius \(a\)
Twice Example 4: \(\dfrac{4\pi a^5}{15}\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
When should I use spherical coordinates?
When the solid is a sphere, hemisphere, cone or part of one, or the integrand contains \(x^2 + y^2 + z^2\).
Why is the volume element r² sin θ dr dθ dφ?
A small spherical box has sides \(dr\), \(r\,d\theta\) and \(r\sin\theta\,d\phi\). Multiplying them gives \(r^2\sin\theta\,dr\,d\theta\,d\phi\). (Formally, it is the Jacobian.)