21. Multiple Integrals in Curvilinear Coordinates

c. Integrating in Spherical Coordinates

3. Applications

Integrals in spherical coordinates are particularly useful when the integrand and/or the limits of integration are spherically symmetric or involve spheres or cones. We previously did Applications of Triple Integrals in rectangular coordinates and Applications of Triple Integrals in cylindrical coordinates. All of those applications can also be done using spherical coordinates and on the next page we will see that it is often useful to convert from rectangular to spherical coordinates.

All the examples on this page of applications of triple integrals in spherical coordinates will use the apple shape shown in the plot. It surface is given in spherical coordinates by \(\rho=1-\cos\phi\) which is a cardioid in any plane through the \(z\)-axis.

eg_sph_cardioid_apple

Volume

To find the volume of a 3D region \(R\) in spherical coordinates, the differential of volume \(dV\) must be expressed in spherical coordinates: \[ \text{Volume}=\iiint_R 1\,dV =\iiint_R \rho^2\sin\phi\,d\rho\,d\phi\,d\theta \]


We set up the integral as \[ V=\int_0^{2\pi}\int_0^\pi\int_{0}^{1-\cos\phi} \,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \] We factor off the \(\theta\)-integral, do the \(\rho\) integral and then the \(\phi\)-integral: \[\begin{aligned} V&=\int_0^{2\pi} \,d\theta \int_0^\pi \left[\dfrac{\rho^3}{3}\right]_{\rho=0}^{1-\cos\phi} \sin\phi\,d\phi \\ &=\dfrac{2\pi}{3}\int_0^\pi (1-\cos\phi)^3\sin\phi\,d\phi =\dfrac{2\pi}{3}\left[\dfrac{(1-\cos\phi)^4}{4}\right]_0^\pi \\ &=\dfrac{\pi}{6}\left[(1--1)^4-(1-1)^4\right] =\dfrac{8}{3}\pi \end{aligned}\]

Mass

To find the mass of a 3D region \(R\) in spherical coordinates, the density \(\delta\) must also be expressed in spherical coordinates: \[ M=\iiint_R \delta(x,y,z)\,dV =\iiint_R \delta(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \]


In spherical coordinates the density is: \[ \delta=x^2+y^2=\rho^2\sin^2\phi \] We set up and evaluate the integral as \[\begin{aligned} M&=\iiint_R \delta\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta =\int_0^{2\pi}\int_0^\pi\int_0^{1-\cos\phi} (\rho^2\sin^2\phi)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=2\pi\int_0^\pi\int_0^{1-\cos\phi} \rho^4\sin^3\phi\,d\rho\,d\phi =2\pi\int_0^\pi \left[\dfrac{\rho^5}{5}\right]_{\rho=0}^{1-\cos\phi} \sin^3\phi\,d\phi \\ &=\dfrac{2\pi}{5}\int_0^\pi (1-\cos\phi)^5 (1-\cos^2\phi)\sin\phi\,d\phi \end{aligned}\] We now make the substitution \(u=1-\cos\phi\) with \(du=\sin\phi\,d\phi\). Consequently: \[ \cos\phi=1-u \quad \text{and} \quad 1-\cos^2\phi=(1-\cos\phi)(1+\cos\phi)=u(2-u) \] So: \[\begin{aligned} M&=\dfrac{2\pi}{5}\int_0^2 u^5u(2-u)\,du =\dfrac{2\pi}{5}\int_0^2 (2u^6-u^7)\,du \\ &=\dfrac{2\pi}{5}\left[2\dfrac{u^7}{7}-\,\dfrac{u^8}{8}\right]_0^2 =\dfrac{2\pi}{5}\left(\dfrac{2^8}{7}-2^5\right) =\dfrac{64}{35}\pi \end{aligned}\]

Center of Mass

To find the center of mass of a 3D region \(R\) in spherical coordinates, the coordinates \(x\), \(y\) and \(z\) must also be expressed in spherical coordinates. So the center of mass is: \[ \bar{x}=\dfrac{M_x}{M} \quad \text{and} \quad \bar{y}=\dfrac{M_y}{M} \quad \text{and} \quad \bar{z}=\dfrac{M_z}{M} \] where the mass of the region is \[ M=\iiint_R \delta(x,y,z)\,dV =\iiint_R \delta(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \] and the \(x\), \(y\) and \(z\) \(1^\text{st}\)-moments of the mass, respectively, are \[\begin{aligned} M_x&=\iiint_R x\,\delta(x,y,z)\,dV =\iiint_R \rho\sin\phi\cos\theta\,\delta(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ M_y&=\iiint_R y\,\delta(x,y,z)\,dV =\iiint_R \rho\sin\phi\sin\theta\,\delta(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ M_z&=\iiint_R z\,\delta(x,y,z)\,dV =\iiint_R \rho\cos\phi\,\delta(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \end{aligned}\]

It is important to remember that we cannot compute \(\bar{\rho}=\dfrac{M_\rho}{M}\), \(\bar{\phi}=\dfrac{M_\phi}{M}\) and \(\bar{\theta}=\dfrac{M_\theta}{M}\) where \[\text{\Large\textcolor{red}Wrong}\qquad \begin{array}{rl} M_\rho&=\displaystyle\iiint_R \rho\,\delta(\rho,\phi,\theta)\,dV \\[8pt] M_\phi&=\displaystyle\iiint_R \phi\,\delta(\rho,\phi,\theta)\,dV \\[8pt] M_\theta&=\displaystyle\iiint_R \theta\,\delta(\rho,\phi,\theta)\,dV \end{array} \qquad \text{\Large\textcolor{red}Wrong} \] because moments are only defined for rectangular coordinates since the balance beam derivation (\(\text{Torque} = \text{Force} \times \text{Lever Arm}\)) does not work for the \(r\) and \(\theta\) directions. If we want the spherical coordinates, \((\bar \rho,\bar\phi,\bar\theta)\) of the center of mass, we must first find the rectangular components and then convert to spherical.


Before we begin, we notice that the given density function is symmetric around the \(z\)-axis (i.e. \(\delta(\rho,\phi,\theta)=\rho^2\sin^2\phi\) does not depend on \(\theta\)). So we can conclude that the \(x\) and \(y\) components of the center of mass are \(\bar{x}=\bar{y}=0\). We have already computed the mass of the region as \(M=\dfrac{64}{35}\pi\). Now we compute the \(z\) moment of mass as \[\begin{aligned} M_z&=\iiint_R z\,\delta\,dV =\int_0^{2\pi}\int_0^\pi\int_0^{1-\cos\phi} (\rho\cos\phi)(\rho^2\sin^2\phi)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=2\pi\int_0^\pi\int_0^{1-\cos\phi} \rho^5\cos\phi\sin^3\phi\,d\rho\,d\phi =2\pi\int_0^\pi \left[\dfrac{\rho^6}{6}\right]_{\rho=0}^{1-\cos\phi} \cos\phi\sin^3\phi\,d\phi \\ &=\dfrac{\pi}{3}\int_0^\pi (1-\cos\phi)^6 \cos\phi(1-\cos^2\phi)\sin\phi\,d\phi \end{aligned}\] We now make the substitution \(u=1-\cos\phi\) with \(du=\sin\phi\,d\phi\). Consequently: \[ \cos\phi=1-u \quad \text{and} \quad 1-\cos^2\phi=(1-\cos\phi)(1+\cos\phi)=u(2-u) \] So: \[\begin{aligned} M_z&=\dfrac{\pi}{3}\int_0^2 u^6(1-u)u(2-u)\,du =\dfrac{\pi}{3}\int_0^2 u^7(2-3u+u^2)\,du \\ &=\dfrac{\pi}{3}\left[2\dfrac{u^8}{8}-3\dfrac{u^9}{9}+\dfrac{u^{10}}{10}\right]_0^2 =\dfrac{\pi}{3}\left(2^6-\,\dfrac{2^9}{3}+\dfrac{2^9}{5}\right) =\dfrac{2^6\pi}{3}\left(1-\,\dfrac{8}{3}+\dfrac{8}{5}\right) =-\,\dfrac{64}{45}\pi \end{aligned}\] Thus, the \(z\) component of the center of mass of the apple is: \[ \bar{z}=\dfrac{M_z}{M} =-\,\dfrac{64}{45}\pi\dfrac{35}{64\pi} =-\,\dfrac{7}{9}\approx-.778 \]

So the center of mass is located at: \[ (\bar{x},\bar{y},\bar{z})=(0,0,-\,\dfrac{7}{9}) \] The center of mass is plotted as a black dot within the apple. It makes sense that \(\bar{z} \lt 0\) because there is more apple below the \(xy\)-plane than above.

eg_sph_cardioid_apple_cm

Centroid

The centroid of a region \(R\) in 3D is the same as the center of mass but with constant density which we take as \(\delta=1\). Then the mass reduces to the volume and the moments of mass become moments of volume. Thus the centroid is: \[ \bar{x}=\dfrac{V_x}{V} \quad \text{and} \quad \bar{y}=\dfrac{V_y}{V} \quad \text{and} \quad \bar{z}=\dfrac{V_z}{V} \] where \(V\) is the volume and the \(x\), \(y\) and \(z\) \(1^\text{st}\)-moments of the volume, respectively, are \[\begin{aligned} V_x&=\iiint_R x\,dV =\iiint_R \rho\sin\phi\cos\theta\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ V_y&=\iiint_R y\,dV =\iiint_R \rho\sin\phi\sin\theta\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ V_z&=\iiint_R z\,dV =\iiint_R \rho\cos\phi\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \end{aligned}\]


By symmetry we see that the \(x\) and \(y\) components of the centroid are \(\bar{x}=\bar{y}=0\). we previously computed the volume \(V=\dfrac{8}{3}\pi\). Now we compute the \(z\) moment of the volume: \[\begin{aligned} V_z&=\iiint_R z\,dV =\int_0^{2\pi}\int_0^\pi\int_0^{1-\cos\phi} (\rho\cos\phi)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=2\pi\int_0^\pi\int_0^{1-\cos\phi} \rho^3\cos\phi\sin\phi\,d\rho\,d\phi \\ &=2\pi\int_0^\pi \left[\dfrac{\rho^4}{4}\right]_{\rho=0}^{1-\cos\phi} \cos\phi\sin\phi\,d\phi =\dfrac{\pi}{2}\int_0^\pi (1-\cos\phi)^4\cos\phi\sin\phi\,d\phi \end{aligned}\] We now make the substitution \(u=1-\cos\phi\) with \(du=\sin\phi\,d\phi\). Consequently, \(\cos\phi=1-u\) and: \[\begin{aligned} V_z&=\dfrac{\pi}{2}\int_0^2 u^4(1-u)\,du =\dfrac{\pi}{2}\left[\dfrac{u^5}{5}-\dfrac{u^6}{6}\right]_0^2 \\ &=\dfrac{\pi}{2}\left(\dfrac{2^5}{5}-\dfrac{2^5}{3}\right) =-\,\dfrac{32}{15}\pi \end{aligned}\] Thus, the \(z\) component of the center of mass of the region is: \[ \bar{z}=\dfrac{V_z}{V} =-\,\dfrac{32\pi}{15}\dfrac{3}{8\pi} =-\,\dfrac{4}{5}\approx-.8 \]

So the centroid is located at: \[ (\bar{x},\bar{y},\bar{z})=(0,0,-.8) \] The centroid is plotted as a black dot within the apple. It makes sense that \(\bar{z} \lt 0\) because there is more apple below the \(xy\)-plane than above.

eg_sph_cardioid_apple_cm

Average Value

To find the average value of a function over a 3D region in spherical coordinates, the function must be evaluated in spherical coordinates before integrating: \[ f_\text{ave}=\dfrac{1}{V}\iiint_R f(x,y,z)\,dV =\dfrac{1}{V}\iiint_R f(\rho,\phi,\theta)\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \]


The average temperature is: \[\begin{aligned} T_\text{ave}&=\dfrac{1}{V}\iiint_R T\,dV =\dfrac{1}{V}\iiint_R 270-z\,dV \\ &=\dfrac{270}{V}\iiint_R 1\,dV-\dfrac{1}{V}\iiint_R z\,dV \end{aligned}\] The first integral is the volume and the second is the \(z\) \(1^\text{st}\) moment of the volume. So: \[ T_\text{ave}=270\dfrac{V}{V}-\dfrac{V_z}{V} =270-\bar z=270-(-.8)=270.8 \]

The following exercises refer to the \(8^\text{th}\) of a sphere in the first octant of radius \(4\). The volume and centroid were found in a previous example using the rectangular coordinates. These computations are much easier using spherical coordinates.

eg_3dapps_sphere_octant
  1. Find the volume of the \(8^\text{th}\) of a sphere.

    \(V=\dfrac{32}{3}\pi\)

    The volume is: \[\begin{aligned} V&=\iiint 1\,dV =\int_0^{\pi/2}\int_0^{\pi/2}\int_0^{4} \rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=\left[\theta\dfrac{}{}\right]_0^{\pi/2}\left[-\cos\phi\dfrac{}{}\right]_0^{\pi/2} \left[\dfrac{\rho^3}{3}\right]_0^4 \\ &=\dfrac{\pi}{2}(--1)\dfrac{4^3}{3} =\dfrac{32}{3}\pi \end{aligned}\]

    Since this is an 8th of a sphere of radius \(4\), the high school geometry formula gives: \[ V=\dfrac{1}{8}\left(\dfrac{4}{3}\pi r^3\right) =\dfrac{1}{8}\left(\dfrac{4}{3}\pi 4^3\right) =\dfrac{32}{3}\pi \] which agrees with our result.

    Notice how much easier this computation was as compared to the rectangular integral done in a previous example.

  2. Find the mass of the \(8^\text{th}\) of a sphere if the density is \(\delta=x^2+y^2+z^2\).

    \(M=\dfrac{512}{5}\pi\)

    In spherical coordinates, the density is \(\delta=x^2+y^2+z^2=\rho^2\). So the mass is: \[\begin{aligned} M&=\iiint \delta\,dV =\int_0^{\pi/2}\int_0^{\pi/2}\int_0^{4} (\rho^2) \rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=\dfrac{\pi}{2}\left[-\cos\phi\dfrac{}{}\right]_0^{\pi/2} \left[\dfrac{\rho^5}{5}\right]_0^4 \\ &=\dfrac{\pi}{2}(--1)\dfrac{4^5}{5} =\dfrac{512}{5}\pi \end{aligned}\]

  3. Find the center of mass of the \(8^\text{th}\) of a sphere if the density is \(\delta=x^2+y^2+z^2\).

    \((\bar{x},\bar{y},\bar{z}) =\left(\dfrac{5}{3},\dfrac{5}{3},\dfrac{5}{3}\right)\)

    We have already found the mass of the region, so now we compute the \(x\),\(y\), and \(z\) moments of mass for the region. By symmetry, they should all yield the same result; therefore, we will simply compute \(\bar{z}\). Recall that \(z=\rho\cos\phi\) and \(\delta=x^2+y^2+z^2=\rho^2\). \[\begin{aligned} M_z&=\iiint\limits_R z\,\delta\,dV =\int_0^{\pi/2}\int_0^{\pi/2}\int_0^4 (\rho\cos\phi)(\rho^2) \rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=\int_0^{\pi/2} \,d\theta \int_0^{\pi/2} \cos\phi\sin\phi \int_0^4 \rho^5\,d\rho \\ &=\left[\theta\right]_0^{\pi/2} \left[\dfrac{\sin^2\phi}{2}\right]_0^{\pi/2} \left[\dfrac{\rho^6}{6}\right]_0^4 =\dfrac{\pi}{2}\dfrac{1}{2}\dfrac{4^6}{6} =\dfrac{512}{3}\pi \end{aligned}\] We conclude: \[ M_z=M_y=M_x=\dfrac{512}{3}\pi \] Finally, we compute the center of mass: \[ \bar{x}=\bar{y}=\bar{z} =\dfrac{M_z}{M}=\dfrac{512\pi}{3}\dfrac{5}{512\pi} =\dfrac{5}{3} \] Thus the center of mass for this region with density \(\delta=\rho^2\) is \[ (\bar{x},\bar{y},\bar{z}) =\left(\dfrac{5}{3},\dfrac{5}{3},\dfrac{5}{3}\right) \]

    We know the center of mass is within the region because \[ \sqrt{\bar{x}^2+\bar{y}^2+\bar{z}^2}\approx 2.89 \lt 4=\rho \]

  4. Compute the average of the temperature, \(T=z\), over the \(8^\text{th}\) of a sphere.

    \(T_\text{ave}=\dfrac{3}{2}\)

    We have already computed the volume \(V=\dfrac{32}{3}\pi\). In spherical coordinates, the temperature is \(T=z=\rho\cos\phi\). So the integral of the temperature is: \[\begin{aligned} \iiint T\,dV &=\int_0^{\pi/2}\int_0^{\pi/2}\int_0^{4} (\rho\cos\phi)\rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=\dfrac{\pi}{2}\left[\dfrac{\sin^2\phi}{2}\right]_0^{\pi/2} \left[\dfrac{\rho^4}{4}\right]_0^4 \\ &=\dfrac{\pi}{2}\dfrac{1}{2}\dfrac{4^4}{4} =16\pi \end{aligned}\] And the average temperature is: \[ T_\text{ave}=\dfrac{1}{V}\iiint T\,dV =\dfrac{3}{32\pi}16\pi =\dfrac{3}{2} \]

  5. Find the centroid of the \(8^\text{th}\) of a sphere.

    \((\bar{x},\bar{y},\bar{z}) =\left(\dfrac{3}{2},\dfrac{3}{2},\dfrac{3}{2}}\right)\)

    The computation is similar to that for the center of mass except that now \(\delta=1\). Again, by symmetry, all components of the centroid will be equal. Thus we only compute the \(z\) component. \[\begin{aligned} V_z&=\iiint\limits_R z\,dV =\int_0^{\pi/2}\int_0^{\pi/2}\int_0^4 (\rho\cos\phi) \rho^2\sin\phi\,d\rho\,d\phi\,d\theta \\ &=\int_0^{\pi/2} \,d\theta \int_0^{\pi/2} \cos\phi\sin\phi\,d\phi \int_0^4 \rho^3\,d\rho\\ &=\dfrac{\pi}{2} \left[\dfrac{\sin^2\phi}{2}\right]_0^{\pi/2} \left[\dfrac{\rho^4}{4}\right]_0^4 =\dfrac{\pi}{2} \dfrac{1}{2} 64 =16\pi \end{aligned}\] We already know the total volume of the region, thus we compute the centroid as \[ \bar{x}=\bar{y}=\bar{z}=\dfrac{V_z}{V} =\dfrac{3}{32\pi}16\pi=\dfrac{3}{2} \]

    We know the center of mass is within the region because \[ \sqrt{\bar{x}^2+\bar{y}^2+\bar{z}^2}\approx 2.6 \lt 4=\rho \]

    Notice how much easier this computation was as compared to the rectangular integral done in a previous example.

4-Volume (Optional)

PY: Move this to a separate page. Make it similar to exercises on pyramids on RectInt/3DApps4Vol.html.

The area of a triangle is \(A=\dfrac{1}{2}(\text{Length of Base})(\text{Height})\).
The volume of a cone is \(V=\dfrac{1}{3}(\text{Area of Base})(\text{Height})\).
What is the 4-volume of a 4D cone?

Find the 4-volume of the 4D cone whose base is the sphere \(x^2+y^2+z^2 \le 9\) and whose upper vertex is at the point \((0,0,0,4)\).
HINT: The upper surface is the 4-cone \(w=4-\,\dfrac{4}{3}\sqrt{x^2+y^2+z^2}\).

ANSWER NEEDED

SOLUTION NEEDED

© MYMathApps

Supported in part by NSF Grant #1123255