Why Transform the Integrand?
When setting up a triple integral in spherical coordinates, it is not enough to express the region using spherical bounds. The function being integrated must also be rewritten in the new coordinates. A Cartesian expression that looks complicated may become simple when written in terms of distance from the origin and the angles.
This tutorial focuses on that conversion. The key is to substitute the spherical coordinate formulas into the integrand, simplify the resulting expressions, and distinguish the transformed function from the full integrand that includes the volume element.
Spherical Coordinate Formulas
We use the convention \( \rho \ge 0 \), \(0 \le \phi \le \pi\), and \(0 \le \theta < 2\pi\), with
Here \(\rho\) is the distance from the origin, \(\phi\) is the angle measured down from the positive \(z\)-axis, and \(\theta\) is the azimuthal angle in the \(xy\)-plane. The volume element for this convention is
If \(f(x,y,z)\) is the function in a triple integral, its transformed function is \(f(\rho\sin\phi\cos\theta,\rho\sin\phi\sin\theta,\rho\cos\phi)\). The full transformed integrand also includes the factor \(\rho^2\sin\phi\) from \(dV\).
Two Identities That Simplify Many Integrands
The expressions \(x^2+y^2\) and \(x^2+y^2+z^2\) occur frequently. Their spherical forms are different: the first measures squared distance from the \(z\)-axis, while the second measures squared distance from the origin.
The last equality uses \(\cos^2\theta+\sin^2\theta=1\). Adding \(z^2=\rho^2\cos^2\phi\) gives
The second equality uses \(\sin^2\phi+\cos^2\phi=1\). These calculations also explain why the azimuthal angle disappears from both expressions.
Coordinate Monomials
For nonnegative integers \(a\), \(b\), and \(c\), substitute the coordinate formulas into each factor of the monomial \(x^a y^b z^c\). Collecting powers gives a general conversion rule:
The power of \(\rho\) is the sum \(a+b+c\), because each Cartesian coordinate contributes one factor of \(\rho\). Each factor of \(x\) or \(y\) contributes a \(\sin\phi\); each factor of \(z\) contributes a \(\cos\phi\). The azimuthal powers come from the \(\cos\theta\) in \(x\) and the \(\sin\theta\) in \(y\).
The rule applies to monomials with nonnegative integer exponents. For an expression that is a sum of monomials, transform each term and then combine terms if possible. For quotients, transform the numerator and denominator and check where the denominator vanishes before simplifying.
Worked Examples
Worked Example: Transforming a Weighted Sum of Squares
Rewrite \(3x^2+2y^2+z^2\) in spherical coordinates. Then include the volume factor for use in a triple integral.
First substitute the formulas for the coordinates:
For the full triple-integral integrand, multiply this result by \(\rho^2\sin\phi\):
To check the substitution, set \(\rho=2\), \(\phi=\frac{\pi}{2}\), and \(\theta=0\). The spherical formulas give \(x=2\), \(y=0\), and \(z=0\), so the original expression is \(3(2)^2=12\). The transformed function is \(2^2[1(3\cdot1+2\cdot0)+0]=12\), as required.
Worked Example: Transforming a Coordinate Monomial
Rewrite \(4xy^2z^3\) in spherical coordinates.
The exponents are \(a=1\), \(b=2\), and \(c=3\). The total power of \(\rho\) is \(1+2+3=6\); the power of \(\sin\phi\) is \(1+2=3\); and the power of \(\cos\phi\) is \(3\). The azimuthal factors are \(\cos\theta\) and \(\sin^2\theta\). Therefore,
For an integral, include the volume factor:
Check by taking \(\rho=1\), \(\phi=\frac{\pi}{2}\), and \(\theta=\frac{\pi}{4}\). The corresponding coordinates are \(x=\frac{\sqrt{2}}{2}\), \(y=\frac{\sqrt{2}}{2}\), and \(z=0\). Both the original monomial and the transformed expression equal \(0\), because the power of \(z\), or equivalently the factor \(\cos^3\phi\), vanishes.
Worked Example: Transforming a Quotient and the Full Integrand
For \(\rho>0\), rewrite
Using the two identities derived above, the numerator becomes \(\rho^2\sin^2\phi\), and the denominator becomes \(\rho^2\). Thus
The cancellation is valid for \(\rho>0\). The original quotient is undefined at the origin, where its denominator is zero. For the triple-integral integrand, multiply by the volume factor:
As a check, at \(\rho=2\), \(\phi=\frac{\pi}{2}\), and \(\theta=0\), the coordinates are \((2,0,0)\). The original quotient is \(\frac{4}{4}=1\); the transformed function is \(\sin^2(\frac{\pi}{2})=1\). The transformed function agrees.
Why the Substitution Works
The conversions above follow directly from the coordinate map, rather than from a memorized list of substitutions. For example, the \(x\)- and \(y\)-coordinates share the factor \(\rho\sin\phi\), so squaring and adding them leaves that factor squared times \(\cos^2\theta+\sin^2\theta\). The identity for sine and cosine removes the angle \(\theta\). Adding \(z^2\) then uses the same identity in \(\phi\) to produce \(\rho^2\).
Likewise, the monomial rule follows by raising each coordinate formula to its indicated power and multiplying. Explicitly,
This calculation justifies the rule for all nonnegative integer exponents: each power is accounted for by ordinary exponent laws. The separate volume factor is needed because a change of coordinates changes the volume represented by a small range of coordinate values. In spherical coordinates that factor is \(\rho^2\sin\phi\).
Common Pitfall: Confusing Two Squared Distances
A common error is to replace \(x^2+y^2\) by \(\rho^2\). That would give
The mistake is that \(\rho^2\) represents \(x^2+y^2+z^2\), not just the part from \(x\) and \(y\). The correct calculation is
For a concrete check, choose \(\rho=2\), \(\phi=\frac{\pi}{3}\), and \(\theta=0\). Then \(x=2\sin(\frac{\pi}{3})=\sqrt{3}\) and \(y=0\), so \(x^2+y^2=3\). The correct spherical expression gives \(4\sin^2(\frac{\pi}{3})=3\), while the incorrect expression \(\rho^2\) gives \(4\).
A different pitfall is to transform the function but forget the volume factor. If \(f\) becomes \(g(\rho,\phi,\theta)\), then the spherical integrand is \(g(\rho,\phi,\theta)\rho^2\sin\phi\), not merely \(g(\rho,\phi,\theta)\). Keep the substitution and the volume element as separate steps so neither is lost.
When a Transformed Expression Is Undefined
Simplification can make an expression look defined at points where the original function was not defined. For example, the quotient in the third worked example is undefined at \(\rho=0\), even though the simplified expression \(\sin^2\phi\) has a value there for any chosen \(\phi\). The spherical coordinates at the origin do not specify a unique pair of angles, and the original quotient still has denominator zero at that point.
Similarly, \(x^2+y^2=\rho^2\sin^2\phi\) vanishes on the \(z\)-axis. A quotient with \(x^2+y^2\) in the denominator is therefore undefined on that axis. Before using a simplified quotient in an integral, identify where its original denominator is zero and make sure the domain and the intended integral account for that issue.
Summary
To transform a Cartesian integrand, substitute the spherical formulas for each coordinate and simplify using trigonometric identities. In particular,
and nonnegative integer monomials follow the rule
For a triple integral, multiply the transformed function by \(\rho^2\sin\phi\). Check cancellations in quotients against the original domain, and verify unfamiliar substitutions by plugging in a simple coordinate point.
Check Your Understanding
For each question, distinguish the transformed function from the full integrand that includes the volume element.
- Rewrite \(x^2+y^2\) and \(x^2+y^2+z^2\) in spherical coordinates. Why are the results different?
- Rewrite \(x^2yz\) in spherical coordinates, showing the power contributed by each coordinate.
- Transform \(z^2/(x^2+y^2+z^2)\) and then include the volume factor.
- What is the error in replacing \(x^2+y^2\) by \(\rho^2\)? Give the correct expression.
- Where is \(1/(x^2+y^2)\) undefined in Cartesian coordinates, and what condition on \(\rho\) and \(\phi\) describes that set in spherical coordinates?