Evaluating Triple Integrals in Spherical Coordinates

# Evaluating Triple Integrals in Spherical Coordinates

Recall from The Spherical Coordinate System page that any point $P(x, y, z) \in \mathbb{R}^3$ can be represented as an ordered triple $(\rho, \theta, \phi)$ (though earlier we denoted spherical coordinates using $(r, \theta, \phi)$, we will replace $r$ with $\rho$ as to not be confused with cylindrical/polar coordinates ) for $\rho ≥ 0$, $0 ≤ \theta ≤ 2\pi$, and $0 ≤ \phi ≤ \pi$.

The value $\rho$ is equal to the length of the line segment connected the origin to $P$, $\theta$ is the angle created by the positive $x$-axis and the projection of the line segment from $O$ to $P$ onto the $xy$-plane, and $\phi$ is the angle between the positive $z$ axis an the line segment from $O$ to $P$. The equations to convert from spherical coordinates to rectangular coordinates are given by the following set of equations:

(1)
\begin{align} \left\{\begin{matrix} x = \rho \sin \phi \cos \theta\\ y = \rho \sin \phi \sin \theta\\ z = \rho \cos \phi \end{matrix}\right. \end{align}

We also have the very useful identity:

(2)
\begin{align} \quad x^2 + y^2 + z^2 = \rho^2 \end{align}

Now suppose that the region $E$ in $\mathbb{R}^3$ that we want to integrate over can be nicely described as $E = \{ (\rho, \theta, \phi) : a ≤ \rho ≤ b, \alpha ≤ \theta ≤ \beta, c ≤ \phi ≤ d \}$. Then the triple integral of a three variable real-valued function $w = f(x, y, z)$ in spherical coordinates can be computed with the following formula:

(3)
\begin{align} \quad \iiint_D f(x, y, z) \: dV = \int_c^d \int_{\alpha}^{\beta} \int_a^b f(\rho \sin \phi \cos \theta, \rho \sin \phi \sin \theta, \rho \cos \phi) \rho^2 \sin \phi \: d \rho \: d \theta \: d \phi \end{align}

Furthermore, if the region $E$ in $\mathbb{R}^3$ is can be nicely expressed as $E = \{ (\rho, \theta, \phi) : g_1(\theta, \phi) ≤ \rho ≤ g_2(\theta, \phi), \alpha ≤ \theta ≤ \beta, c ≤ \phi ≤ d \}$ then the triple integral of $f$ in spherical coordinates can be computed with the following formula:

(4)
\begin{align} \quad \iiint_D f(x, y, z) \: dV = \int_c^d \int_{\alpha}^{\beta} \int_{g_1(\theta, \phi)}^{g_2(\theta, \phi)} f(\rho \sin \phi \cos \theta, \rho \sin \phi \sin \theta, \rho \cos \phi) \rho^2 \sin \phi \: d \rho \: d \theta \: d \phi \end{align}

What is really nice is that often times, if $E$ is a portion which can be obtained by shapes such as spheres or cones, then evaluating the triple integral of $w = f(x, y, z)$ over $E$ can be simplified greatly with the use of spherical coordinates.