Triple Integrals. Spherical coordinates
Life is a math equation. In order to gain the most, you have to know how to convert negatives into positives, Anonymous.
Mastering Spherical Coordinates: A Complete Guide
Spherical coordinates are a powerful system used to represent points in three-dimensional space using three parameters: a radial distance $\rho$ (rho), the polar angle $\phi$, and the azimuthal angle $\theta$. In other words, it describes or specifies the position of a point in a three-dimensional space by three numbers $(\rho, \phi, \theta)$. This system is particularly effective for problems involving spherical symmetry, such as those involving spheres or radial distributions. Understanding spherical coordinates provides a powerful tool for solving complex problems in multivariable calculus and physics.
This article uses the standard mathematical calculus convention: $\rho$ for radial distance, $\theta$ for azimuthal angle, and $\phi$ for polar angle. Be aware that many physics textbooks swap the symbols for $\theta$ and $\phi$ (Figure i).
The Geographic Analogy: Longitude, Latitude, and Altitude
The easiest way to understand spherical coordinates is to imagine the Earth:
- $\rho$ (rho): Think of this as your distance from the center of the Earth.
- $\theta$ (theta): Think of this as Longitude. It measures your rotation around the equator.
- $\phi$ (phi): Think of this as Colatitude. Instead of measuring from the equator, we measure downward from the North Pole.
Colatitude is the complement of the latitude.
Formal Definitions of the Parameters $(\rho, \theta, \phi)$
- $\rho$ is the radial distance. This is the absolute straight-line distance from the origin to a given point $P$ in space. It ranges from 0 to infinity, $0 \le \rho < \infty$.
- $\phi$ is the polar angle, measured downward from the positive $z$-axis to the radial line $\rho$ (the line connecting the origin to the point $P$). It values increases from $0$ (positive $z$-axis), $\frac{\pi}{2}$ (xy-plane), and $\pi$ (negative $z$-axis), that is, $0 \le \phi \le \pi$ (it stops at the negative $z$-axis, or South Pole).
It describes how far the point has “dropped” from the North Pole (the $z$-axis). - $\theta$ is the azimuthal angle, measured counterclockwise from the positive $x$-axis to the projection of the radial line onto the $xy$-plane. It ranges from $0$ to $2\pi$, representing a full rotation around the z-axis. \ It describes the rotation around the z-axis. This is exactly the same $\theta$ used in polar and cylindrical coordinates.
Conversion to Cartesian Coordinates
To convert a point from spherical $(\rho, \theta, \phi)$ to Cartesian $(x, y, z)$, we can use basic trigonometry.
First, look at the vertical triangle formed with the $z$-axis. The vertical height is $z = \rho \cos(\phi)$. The horizontal projection onto the $xy$-plane is $r = \rho \sin\phi$.
By substituting this $r$ into our standard cylindrical conversion formulas ($x = r \cos(\theta)$, $y = r \sin(\theta)$), we get the complete transformation equations: $\begin{aligned} x &= \rho \sin\phi \cos\theta \\ y &= \rho \sin\phi \sin\theta \\ z &= \rho \cos\phi \end{aligned}$
These relationships describe how a point in spherical coordinates maps onto the $x$, $y$, and $z$ axes of Cartesian coordinates. The inverse transformations are given by, $\rho = \sqrt{x^2 + y^2 + z^2}, \phi = \arccos\left(\frac{z}{\sqrt{x^2 + y^2 + z^2}}\right)$, and $\tan(\theta) = \frac{y}{x}$ (adjusted based on the $(x,y)$ quadrant).
Calculating Volume Element dV
When setting up triple integrals in spherical coordinates, you cannot simply use $dV = d\rho \, d\phi \, d\theta$. Because the grid lines curve and spread out the further you get from the origin, the volume of a “differential wedge” changes depending on its location.
Imagine a tiny 3D curved brick in space. Its three side lengths are:
- The change in radial distance: $d\rho$.
- The arc length moving vertically (polar): $\rho \, d\phi$.
- The arc length moving horizontally (azimuthal). Because the horizontal radius is $r = \rho \sin\phi$, this arc length is: $\rho \sin\phi \, d\theta$
Multiplying these three dimensions together yields the proper volume element (which can also be rigorously derived using the Jacobian determinant): $\boxed{dV = \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta}$
Visualizing Constant Surfaces
Just as $x=3$ describes a flat plane in Cartesian coordinates, holding a spherical coordinate constant creates a specific 3D surface:
- $\rho = 3$ (A Sphere): Describes all points exactly 3 units from the origin. This forms a perfect sphere of radius 3 centered at the origin.
- $\theta = \frac{\pi}{4}$ (A Half-Plane): Describes all points with a horizontal angle of 45 degrees. This forms a vertical half-plane acting like a swinging door hinged on the $z$-axis.
- $\phi = \frac{\pi}{4}$ (A Cone): Describes all points at a constant 45-degree angle from the $z$-axis. This forms a cone opening upwards. Conversely, $\phi = \frac{3\pi}{4}$ forms a cone opening downward (135 degrees from the top).
- $\rho = 2\cos\phi$ (An Off-Center Sphere): While not immediately obvious, we can prove this by converting to Cartesian. Multiply both sides by $\rho$ to get $\rho^2 = 2\rho\cos\phi$. Substituting Cartesian equivalents yields $x^2 + y^2 + z^2 = 2z$. Completing the square gives $x^2 + y^2 + (z - 1)^2 = 1$, which is a sphere of radius 1 centered at $(0, 0, 1)$.
Solved Examples
- Find the mass of a sphere of radius 4 centered at the origin, with a density function $f(\rho, \phi, \theta) = 5 - \rho$.
-
Understanding the problem We need to integrate the density function over the volume of the sphere in spherical coordinates. The volume element in spherical coordinates is $dV = \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$. The integral for mass is $M = \iiint_V f(\rho, \phi, \theta) \, dV$.
-
Boundaries in Spherical Coordinates:
Radial Distance ($\rho$): This is the distance from the origin to a given point. For a sphere of radius 4, $\rho$ ranges from $0$ (at the center of the sphere) to $4$ (at the surface of the sphere).
Polar Angle ($\phi$): This angle is measured between the positive $z$-axis and the line connecting the origin to the point. For a full sphere, $\phi$ ranges from $0$ (pointing directly upwards along the positive z-axis, the North Pole) to $\pi$ (pointing directly downwards along the negative z-axis, the South Pole).
Azimuthal Angle ($\theta$): The angle is measured in the $xy$-plane from the positive $x$-axis to the projection of the line connecting the origin to the point onto the $xy$-plane. For a full rotation around the $z$-axis, $\theta$ ranges from $0$ to $2\pi$. -
Setting Up the Integral The integral to find the mass M is: $M = \int_{0}^{2\pi} \int_{0}^{\pi} \int_{0}^{4} (5 - \rho) \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$
-
Evaluating the Integral First, expand the inner function: $(5\rho^2 - \rho^3)\sin\phi$.
Calculating the inner integral with respect to $\rho$: $\int_{0}^{4} (5\rho^2-\rho^3)d\rho = (\frac{5}{3}\rho^3-\frac{1}{4}\rho^4)\bigg|_{0}^{4} = (\frac{5}{3} \cdot 64-\frac{1}{4} \cdot 256) = \frac{320}{3}-64=\frac{128}{3}$
Calculating the middle integral with respect to $\phi$: $\int_{0}^{\pi} \frac{128}{3} \sin\phi \, d\phi = \frac{128}{3} \left[ -\cos\phi \right]_{0}^{\pi}$
$= \frac{128}{3} ( -\cos(\pi) - (-\cos(0)) ) = \frac{128}{3} (1 + 1) = \frac{256}{3}$
Calculating the outer integral: $\int_{0}^{2\pi} \frac{256}{3} \, d\theta = \frac{256}{3} \left[ \theta \right]_{0}^{2\pi} = \frac{512\pi}{3}$. This result represents the total mass of the sphere with the given variable density, computed by integrating over the entire volume using spherical coordinates.
- Volume of a Spherical Cap We aim to find the volume of the unit sphere $\rho = 1$ that lies above the plane $z = \frac{1}{\sqrt{2}}$ (Figure A)
-
Understanding the problem: The unit sphere is defined by the equation: $x^2 + y^2 + z^2 = 1$. In spherical coordinates, this equation becomes: $\rho =1$. The plane is given by: $z = \frac{1}{\sqrt{2}}$.
The plane essentially slices the top off the sphere, leaving a “cap.” We must translate the plane $z = \frac{1}{\sqrt{2}}$ into spherical coordinates. Since $z = \rho\cos\phi$, the plane is: $\rho\cos\phi = \frac{1}{\sqrt{2}} \implies \rho = \frac{1}{\sqrt{2}\cos\phi} = \frac{\sec\phi}{\sqrt{2}}$ -
Setting Up the Integral To set up the integral, we need to determine the limits of integration in spherical coordinates. The volume element in spherical coordinates is given by $dV = \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$.
-
Determining the Limits of Integration
$\rho$ (Radial): A ray originating from the origin first pierces the flat plane and exits through the curved sphere. Therefore, $\rho$ ranges from the plane $\frac{\sec\phi}{\sqrt{2}}$ to the sphere $1$.
$\phi$ (polar angle) ranges from 0 (we start at the North Pole of the sphere) to $\frac{π}{4}$ (where the plane intersects the sphere, $1 = \frac{1}{\sqrt{2}\cos\phi} \implies \cos\phi = \frac{1}{\sqrt{2}} \implies \phi = \frac{\pi}{4}$).
$\theta$ (Azimuthal): We sweep entirely around the $z$-axis, so $\theta \in [0, 2\pi]$. -
$V = \int_{0}^{2\pi} \int_{0}^{\frac{\pi}{4}} \int_{\frac{\sec\phi}{\sqrt{2}}}^{1} \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$
-
Evaluating the Integral
Inner Integral (with respect to $\rho$): $\int_{\frac{\sec\phi}{\sqrt{2}}}^{1} \rho^2 \, d\rho = \left[ \frac{\rho^3}{3} \right]_{\frac{\sec\phi}{\sqrt{2}}}^{1} = \frac{1}{3} - \frac{\sec^3\phi}{3\left(\sqrt{2}\right)^3} = \frac{1}{3} - \frac{\sec^3\phi}{6\sqrt{2}}$ Middle Integral (with respect to $\phi$): Distribute the $\sin\phi$ from the volume element: $\int_{0}^{\frac{\pi}{4}} \left( \frac{1}{3}\sin\phi - \frac{\sec^3\phi \sin\phi}{6\sqrt{2}} \right) \, d\phi$
We can split this into two parts.
Part A: $\frac{1}{3} \int_{0}^{\frac{\pi}{4}} \sin\phi \, d\phi = \frac{1}{3} \left[ -\cos\phi \right]_{0}^{\frac{\pi}{4}} = \frac{1}{3} \left( -\frac{\sqrt{2}}{2} + 1 \right) = \frac{2 - \sqrt{2}}{6}$
Part B: Notice that $\sec^3\phi \sin\phi = \frac{\sin\phi}{\cos^3\phi} = \left(\frac{\sin\phi}{\cos\phi}\right)\left(\frac{1}{\cos^2\phi}\right) = \tan\phi \sec^2\phi$.
$- \frac{1}{6\sqrt{2}} \int_{0}^{\frac{\pi}{4}} \tan\phi \sec^2\phi \, d\phi$
Using $u = \tan\phi$ and $du = \sec^2\phi \, d\phi$: $- \frac{1}{6\sqrt{2}} \left[ \frac{\tan^2\phi}{2} \right]_{0}^{\frac{\pi}{4}} = - \frac{1}{6\sqrt{2}} \left( \frac{1}{2} - 0 \right) = - \frac{1}{12\sqrt{2}}$
Combine Part A and Part B (by finding a common denominator of $24$): $\frac{2 - \sqrt{2}}{6} = \frac{4(2 - \sqrt{2})}{24} = \frac{8 - 4\sqrt{2}}{24}$
$- \frac{1}{12\sqrt{2}} = - \frac{\sqrt{2}}{24}$
Adding them together: $\frac{8 - 4\sqrt{2} - \sqrt{2}}{24} = \frac{8 - 5\sqrt{2}}{24}$
Outer Integral (with respect to $\theta$): $V = \int_{0}^{2\pi} \left( \frac{8 - 5\sqrt{2}}{24} \right) \, d\theta = 2\pi \left( \frac{8 - 5\sqrt{2}}{24} \right) = \pi \left( \frac{8 - 5\sqrt{2}}{12} \right)$
- The Volume of an “Ice Cream Cone”. Find the volume of the region that lies inside the cone $\phi = \frac{\pi}{3}$ and inside the sphere $\rho = 6$ (Figure 1).
-
Understanding the Geometry. Imagine a scoop of ice cream perfectly melted into a waffle cone.
The equation $\rho = 6$ gives us the rounded top: a sphere of radius 6 centered at the origin. \ The equation $\phi = \frac{\pi}{3}$ gives us the cone. Recall that the polar angle $\phi$ measures the angle dropping down from the positive $z$-axis (the “North Pole”). By restricting $\phi$ to sweep from $0$ down to $\frac{\pi}{3}$ (which is 60 degrees), we carve out a cone opening upwards. -
Setting Up the Integral. To find the volume, we integrate the spherical volume element $dV = \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$ over the boundaries of our solid.
-
Boundaries in Spherical Coordinates:
Radial Distance ($\rho$): For any point inside this solid, the distance from the origin ranges from the center out to the edge of the sphere. Therefore, $0 \le \rho \le 6$.
Polar Angle ($\phi$): The angle drops from the vertical $z$-axis ($\phi=0$) down to the edge of the cone ($\phi=\frac{\pi}{3}$). Therefore, $0 \le \phi \le \frac{\pi}{3}$.
Azimuthal Angle ($\theta$): The solid possesses complete rotational symmetry around the $z$-axis. It sweeps a full circle, so $0 \le \theta \le 2\pi$. -
The volume $V$ is given by the triple integral: $V = \int_{0}^{2\pi} \int_{0}^{\frac{\pi}{3}} \int_{0}^{6} \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$
-
Evaluating the integral.
Calculate the inner integral with respect to $\rho$: $\int_{0}^{6} \rho^2 \, d\rho = \left[ \frac{\rho^3}{3} \right]_{0}^{6} = \frac{216}{3} = 72$
The middle integral (with respect to $\phi$): $\int_{0}^{\frac{\pi}{3}} 72 \sin\phi \, d\phi = 72 \left[ -\cos\phi \right]_{0}^{\frac{\pi}{3}}$
$= 72 \left( -\cos\left(\frac{\pi}{3}\right) - (-\cos(0)) \right) = 72 \left( -\frac{1}{2} + 1 \right) = 72 \left( \frac{1}{2} \right) = 36$
Compute the outer integral: $\int_{0}^{2\pi} 36 \, d\theta = 36 \left[ \theta \right]_{0}^{2\pi} = 72\pi$ -
Conclusion. The volume of the region inside the cone and the sphere is $72\pi$.
- Evaluate the following integral by converting it to spherical coordinates: $I = \int_{0}^{2} \int_{0}^{\sqrt{4-y^2}} \int_{\sqrt{3(x^2+y^2)}}^{\sqrt{16-x^2-y^2}} (x^2+y^2+z^2) \, dz \, dx \, dy$
Note: In physics, integrating $(x^2+y^2+z^2)$, which is the square of the distance from the origin, is often used to calculate the Moment of Inertia—a measure of how resistant a 3D object is to rotational acceleration.
-
Decoding the Boundaries (The “Sherlock Holmes” Method). To solve this, we must work backward to discover the 3D shape hidden inside the integral limits.
The Floor and Ceiling ($z$-bounds): The innermost limits tell us about the vertical boundaries of the solid.
Floor: $z = \sqrt{3(x^2+y^2)}$. This is a cone with its vertex at the origin. The $\sqrt{3}$ dictates the steepness.
Ceiling: $z = \sqrt{16-x^2-y^2}$. Squaring both sides yields $x^2+y^2+z^2 = 16$. This is a sphere of radius 4 (Figure 2).$z = \sqrt{3(x^2+y^2)}$ is a cone with its vertex at the origin and its axis along the z-axis. The constant 3 under the square root affects the “steepness” of the cone. (1) $z = \sqrt{3}$: $\sqrt{3} = \sqrt{3(x² + y²)} \implies x² + y² = 1$. This is a circle of radius 1 centered at the origin in the plane $z = \sqrt{3}$. (2) $z = 2\sqrt{3}$: $2\sqrt{3} = \sqrt{3(x² + y²)} \implies x² + y² = 4$. This is a circle of radius 2 centered at the origin in the plane $z = 2\sqrt{3}$.
-
The 2D Shadow ($x$ and $y$-bounds): The outer limits tell us about the projection (or shadow) of this solid on the $xy$-plane. Why are the limits $0 \le y \le 2$ and $0 \le x \le \sqrt{4-y^2}$?
Let’s find exactly where the cone and the sphere intersect by setting their equations equal to each other.
Substitute the cone $z^2 = 3(x^2+y^2)$ into the sphere $x^2+y^2+z^2 = 16$: $x^2 + y^2 + 3(x^2 + y^2) = 16$
$4(x^2 + y^2) = 16 \implies x^2 + y^2 = 4$. The intersection forms a circle of radius 2.
Now, look back again at the Cartesian limits: $x$ goes from $0$ to the positive edge of that circle ($\sqrt{4-y^2}$), and $y$ goes from $0$ to $2$. This perfectly describes the first quadrant of that circle (where $x \ge 0$ and $y \ge 0$). -
Setting Up the Spherical Integral. We must translate these discoveries into spherical limits ($\rho, \phi, \theta$).
Radial Distance ($\rho$): The solid expands from the origin to the sphere of radius 4. Thus, $0 \le \rho \le 4$.
Polar Angle ($\phi$): We need the angle of the cone $z = \sqrt{3(x^2+y^2)}$.
Convert this to spherical variables: $\rho\cos\phi = \sqrt{3(\rho^2 \sin^2\phi \cos^2\theta + \rho^2 \sin^2\phi \sin^2\theta)}$
$\rho\cos\phi = \sqrt{3\rho^2 \sin^2\phi(\cos^2\theta + \sin^2\theta)} \implies \rho\cos\phi = \sqrt{3} \rho \sin\phi$
Divide both sides by $\rho\cos\phi$: $1 = \sqrt{3} \tan\phi \implies \tan\phi = \frac{1}{\sqrt{3}} \implies \phi = \frac{\pi}{6}$
The angle sweeps from the $z$-axis down to the cone, so $0 \le \phi \le \frac{\pi}{6}$.
Azimuthal Angle ($\theta$): Because the 2D shadow is restricted to the first quadrant, we only sweep 90 degrees around the $xy$-plane ($z$-axis). Thus, $0 \le \theta \le \frac{\pi}{2}$. -
Setting Up the Integral in Spherical Coordinates. Finally, we convert the integrand and the volume element:
Integrand: $(x^2+y^2+z^2) = \rho^2$. Volume Element: $dV = \rho^2 \sin\phi \, d\rho \, d\phi \, d\theta$.
Multiplying these terms together, our new integral is: $I = \int_{0}^{\frac{\pi}{2}} \int_{0}^{\frac{\pi}{6}} \int_{0}^{4} (\rho^2)(\rho^2 \sin\phi) \, d\rho \, d\phi \, d\theta = \int_{0}^{\frac{\pi}{2}} \int_{0}^{\frac{\pi}{6}} \int_{0}^{4} \rho^4 \sin\phi \, d\rho \, d\phi \, d\theta$ -
Evaluating the Integral
Inner integral (with respect to $\rho$): $\int_{0}^{4} \rho^4 \, d\rho = \left[ \frac{\rho^5}{5} \right]_{0}^{4} = \frac{1024}{5}$
Middle integral (with respect to $\phi$): $\int_{0}^{\frac{\pi}{6}} \frac{1024}{5} \sin\phi \, d\phi = \frac{1024}{5} \left[ -\cos\phi \right]_{0}^{\frac{\pi}{6}}$
$= \frac{1024}{5} \left( -\cos\left(\frac{\pi}{6}\right) - (-\cos(0)) \right) = \frac{1024}{5} \left( -\frac{\sqrt{3}}{2} + 1 \right) = \frac{1024}{5} \left( 1 - \frac{\sqrt{3}}{2} \right)$
Outer integral (with respect to $\theta$): $\int_{0}^{\frac{\pi}{2}} \frac{1024}{5} \left( 1 - \frac{\sqrt{3}}{2} \right) \, d\theta = \frac{1024}{5} \left( 1 - \frac{\sqrt{3}}{2} \right) \left[ \theta \right]_{0}^{\frac{\pi}{2}}$
$= \frac{1024}{5} \left( 1 - \frac{\sqrt{3}}{2} \right) \left( \frac{\pi}{2} \right)$
Divide $1024$ by $2$ to simplify the fraction: $I = \frac{512\pi}{5} \left( 1 - \frac{\sqrt{3}}{2} \right)$
Bibliography
- NPTEL-NOC IITM, Introduction to Galois Theory.
- Algebra, Second Edition, by Michael Artin.
- LibreTexts, Calculus and Calculus 3e (Apex). Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
- Field and Galois Theory, by Patrick Morandi. Springer.
- Michael Penn, and MathMajor.
- Contemporary Abstract Algebra, Joseph, A. Gallian.
- YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
- MIT OpenCourseWare 18.01 Single Variable Calculus, Fall 2007 and 18.02 Multivariable Calculus, Fall 2007.
- Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.