Tutorials › Calculus III › Coordinate Conventions for Spherical Integration

Spherical Triple Integrals · Tutorial 650 of 999

Coordinate Conventions for Spherical Integration

Translate points and coordinate expressions between Cartesian and spherical coordinates, and interpret angle ranges consistently when setting up spherical bounds.

Intermediate 9 min read

What You'll Learn

  • Use the course convention for radius, polar angle, and azimuthal angle
  • Convert Cartesian points to spherical coordinates and verify the result
  • Convert spherical coordinates back to Cartesian coordinates
  • Translate common coordinate expressions using spherical variables
  • Interpret angle ranges and their effects on region bounds
  • Recognize when spherical angles are not uniquely determined

Why Coordinate Conventions Matter

Spherical coordinates describe a point using its distance from the origin and two angles. They are useful when a region or an integrand has a natural relationship to distance from the origin or to direction. But the symbols and angle conventions are not universal: different books may use the same Greek letters for different angles.

For a point, the numerical values of its spherical coordinates are meaningful only after the convention has been specified. In an iterated integral, the convention also determines which angular interval describes the region. A correct calculation with the wrong convention can therefore describe a different point and produce incorrect bounds.

The Convention Used Here

Write \(\rho\) for the distance from the origin, \(\phi\) for the polar angle measured down from the positive \(z\)-axis, and \(\theta\) for the azimuthal angle measured in the \(xy\)-plane from the positive \(x\)-axis toward the positive \(y\)-axis.

Definition: In this course, spherical coordinates \((\rho,\phi,\theta)\) are related to Cartesian coordinates by
$$ x=\rho\sin\phi\cos\theta,\qquad y=\rho\sin\phi\sin\theta,\qquad z=\rho\cos\phi. $$
The standard ranges are \(\rho\geq 0\), \(0\leq\phi\leq\pi\), and \(0\leq\theta<2\pi\).

The radius \(\rho\) is nonnegative. The polar angle \(\phi\) runs from the positive \(z\)-axis through the equatorial plane to the negative \(z\)-axis. The azimuthal angle \(\theta\) makes one full turn around the \(z\)-axis. The endpoint \(2\pi\) is excluded from the standard azimuthal interval because it gives the same direction as \(0\).

From Spherical Coordinates to Cartesian Coordinates

The formulas follow by considering the projection of a point onto the \(xy\)-plane. Let \(r_{\!xy}\) be the distance of that projection from the origin. In the right triangle formed by the point, its projection, and the origin, \(\rho\) is the hypotenuse and \(\phi\) is measured from the vertical side. Therefore \(z=\rho\cos\phi\) and \(r_{\!xy}=\rho\sin\phi\). In the \(xy\)-plane, the azimuthal angle gives the usual relations \(x=r_{\!xy}\cos\theta\) and \(y=r_{\!xy}\sin\theta\). Substitution yields the defining formulas.

Worked Example: Convert a Spherical Point to Cartesian Coordinates

Convert \((\rho,\phi,\theta)=(2,\pi/3,\pi/6)\) to Cartesian coordinates.

First evaluate the needed trigonometric values: \(\sin(\pi/3)=\sqrt{3}/2\), \(\cos(\pi/3)=1/2\), \(\cos(\pi/6)=\sqrt{3}/2\), and \(\sin(\pi/6)=1/2\).

Then \(x=2(\sqrt{3}/2)(\sqrt{3}/2)=3/2\), \(y=2(\sqrt{3}/2)(1/2)=\sqrt{3}/2\), and \(z=2(1/2)=1\). Thus the Cartesian point is \((3/2,\sqrt{3}/2,1)\).

Check the radius: \((3/2)^2+(\sqrt{3}/2)^2+1^2=9/4+3/4+1=4\), so the distance from the origin is \(2\), as required. Also, the point has positive \(x\) and \(y\), consistent with \(\theta=\pi/6\), and positive \(z\), consistent with \(\phi=\pi/3<\pi/2\).

From Cartesian Coordinates to Spherical Coordinates

For a Cartesian point \((x,y,z)\), its radius is its distance from the origin. If \(\rho>0\), the polar angle is determined by the vertical component, and the azimuth is determined by the direction of the \(xy\)-projection:

$$ \rho=\sqrt{x^2+y^2+z^2},\qquad \phi=\arccos\!\left(\frac{z}{\rho}\right). $$

For the azimuth, use the angle in the \(xy\)-plane whose cosine and sine have the signs of \(x\) and \(y\), respectively. Equivalently, \(\theta=\operatorname{atan2}(y,x)\), adjusted to lie in \(0\leq\theta<2\pi\). This quadrant-aware choice matters: \(\arctan(y/x)\) alone does not distinguish all four quadrants.

Important: At the origin, \(\rho=0\), and neither angle is determined. On the \(z\)-axis away from the origin, \(\phi\) is determined but \(\theta\) is not, because the projection into the \(xy\)-plane is the origin. Away from these cases, the standard ranges give a unique spherical representation.

Worked Example: Convert a Cartesian Point to Spherical Coordinates

Convert \((x,y,z)=(\sqrt{3},1,2)\) to spherical coordinates.

Compute the radius: \(\rho=\sqrt{(\sqrt{3})^2+1^2+2^2}=\sqrt{3+1+4}=\sqrt{8}=2\sqrt{2}\).

Next, \(\cos\phi=z/\rho=2/(2\sqrt{2})=1/\sqrt{2}\). Since \(0\leq\phi\leq\pi\), this gives \(\phi=\pi/4\).

For the azimuth, \(x>0\) and \(y>0\), so \(\theta\) lies in the first quadrant. Since \(y/x=1/\sqrt{3}\), \(\theta=\pi/6\). The spherical coordinates are \((2\sqrt{2},\pi/4,\pi/6)\).

Check by substitution: \(x=(2\sqrt{2})(\sqrt{2}/2)(\sqrt{3}/2)=\sqrt{3}\), \(y=(2\sqrt{2})(\sqrt{2}/2)(1/2)=1\), and \(z=(2\sqrt{2})(\sqrt{2}/2)=2\). The original point is recovered.

Coordinate Expressions

The defining formulas also give useful identities. Squaring and adding the expressions for \(x\) and \(y\) removes the azimuthal angle, while including \(z\) gives the squared distance from the origin:

$$ x^2+y^2=\rho^2\sin^2\phi,\qquad x^2+y^2+z^2=\rho^2. $$

Also, \(z=\rho\cos\phi\) directly. Ratios such as \(x/y=\cot\theta\) require \(y\neq 0\), so using the defining equations is safer when an expression might be undefined on part of a region.

Worked Example: Translate and Check a Coordinate Expression

Rewrite \(x^2+y^2+z^2+2z\) in spherical coordinates, then evaluate it at \((\rho,\phi,\theta)=(3,\pi/3,\pi/4)\).

Using \(x^2+y^2+z^2=\rho^2\) and \(z=\rho\cos\phi\), the expression becomes \(\rho^2+2\rho\cos\phi\). At the specified point, its value is \(3^2+2(3)\cos(\pi/3)=9+6(1/2)=12\).

Check in Cartesian coordinates. The point has \(x=3(\sqrt{3}/2)(\sqrt{2}/2)=3\sqrt{6}/4\), \(y=3(\sqrt{3}/2)(\sqrt{2}/2)=3\sqrt{6}/4\), and \(z=3(1/2)=3/2\). Thus \(x^2+y^2=2(54/16)=27/4\), and \(z^2=9/4\), so \(x^2+y^2+z^2=9\). Adding \(2z=3\) gives \(12\), agreeing with the spherical calculation.

Angle Ranges and Bounds

An angular bound describes a range of directions, not a range of distances from the origin. The polar interval controls how far a direction tilts away from the positive \(z\)-axis; the azimuthal interval controls the direction around that axis. A radial interval controls the distance from the origin. Keeping these roles separate helps prevent bounds from being assigned to the wrong variable.

For example, in the first octant, \(x,y,z\geq0\). The condition \(z\geq0\) corresponds to \(0\leq\phi\leq\pi/2\). The conditions \(x,y\geq0\) place the azimuth in the first quadrant, \(0\leq\theta\leq\pi/2\). These angular ranges do not by themselves set a radial extent: the region might include all positive radii, or it might have a separate radial restriction.

Worked Example: Read Spherical Bounds for a Bounded Region

Consider the region described by \(1\leq\rho\leq2\), \(0\leq\phi\leq\pi/2\), and \(0\leq\theta\leq\pi/2\). The radial variable ranges from \(1\) to \(2\), while the angle ranges select directions in the first octant. To check the interpretation, choose the allowed values \(\rho=2\), \(\phi=\pi/3\), and \(\theta=\pi/4\).

The corresponding point is \(x=2(\sqrt{3}/2)(\sqrt{2}/2)=\sqrt{6}/2\), \(y=2(\sqrt{3}/2)(\sqrt{2}/2)=\sqrt{6}/2\), and \(z=2(1/2)=1\). All three coordinates are nonnegative. Its distance from the origin satisfies \(x^2+y^2+z^2=6/4+6/4+1=4\), so its radius is \(2\), which is within the stated radial bounds.

When these limits are used in an iterated spherical integral, each interval must be attached to its matching variable. The bounds alone specify the coordinate ranges; the volume element is a separate part of setting up the integral.

Why the Convention Changes Integral Bounds

In this convention, \(\phi\) measures inclination from the \(z\)-axis and \(\theta\) measures rotation around that axis. Thus a condition about whether a point lies above or below the \(xy\)-plane affects the range of \(\phi\), while a condition restricting directions in the \(xy\)-plane affects the range of \(\theta\). If a reference uses the opposite assignment of symbols, the numerical limits may belong to the other symbol there.

For instance, a direction in the first octant has both angles between \(0\) and \(\pi/2\), so merely seeing those endpoints does not reveal which convention is being used. The defining equations do. Before setting angular bounds, identify the angle definitions, then translate the region's directional conditions using those definitions. Do not transfer a symbol's bounds from a different convention without translating them.

Common Mistake: Swapping the Angles

A frequent error is to use formulas from a convention where \(\theta\) is the polar angle and \(\phi\) is the azimuth, while keeping the present course's meanings and bounds. For the spherical point \((2,\pi/3,\pi/6)\), the correct formulas give \((x,y,z)=(3/2,\sqrt{3}/2,1)\), as checked above.

If the angles are mistakenly swapped in the coordinate formulas, one might calculate \(x=2\sin(\pi/6)\cos(\pi/3)=1/2\), \(y=2\sin(\pi/6)\sin(\pi/3)=\sqrt{3}/2\), and \(z=2\cos(\pi/6)=\sqrt{3}\). That is the different point \((1/2,\sqrt{3}/2,\sqrt{3})\), not the intended point. Its squared distance is \(1/4+3/4+3=4\), so checking only the radius would fail to catch the mistake. The correction is to keep the course's roles fixed: \(\phi\) is polar, \(\theta\) is azimuthal, and the defining equations must be used consistently.

Coordinate Checks Before Using Bounds

Before using spherical coordinates, it is useful to check three things:

  • Does \(\rho\) have a nonnegative range and represent distance from the origin?
  • Do the formulas use \(\phi\) as the polar angle and \(\theta\) as the azimuth?
  • Do the angular intervals match the directions allowed by the region?

These checks are especially important when an interval begins or ends at an axis, when a region crosses an azimuthal wraparound, or when the formulas have been copied from a source using different symbols. Spherical coordinates are not unique on the axis or at the origin, so those exceptional points should not be treated as having uniquely determined angles.

Check Your Understanding

Use the convention and ranges stated above.

  1. Convert \((\rho,\phi,\theta)=(4,\pi/2,\pi)\) to Cartesian coordinates.
  2. Find the spherical coordinates of \((0,0,-3)\), and explain which angle is undetermined.
  3. What angular ranges describe directions in the first octant?
  4. Rewrite \(x^2+y^2\) in spherical coordinates.
  5. Why can an incorrect angle convention produce the wrong point even when the computed radius is correct?