17. Double integrals in polar coordinates

📖 Reading · 10 min
💡 Every code box below is live — edit it and hit Run.

§6.2 and §6.3 rebuilt curves and areas in polar coordinates because circular boundaries are painful to describe with x and y. Double integrals inherit the identical problem — integrating over a disk in Cartesian coordinates forces awkward square-root boundaries — and the identical fix: switch to r and \theta. The one genuinely new ingredient is a factor that has to be inserted by hand, and this lesson derives exactly why.

The polar area element

Chop the plane into a grid of polar "rectangles" — thin rings of width \Delta r, split into wedges of angle \Delta\theta. Unlike an ordinary Cartesian grid cell, a polar grid cell's area depends on how far out it sits: a sector spanning angle \Delta\theta at radius r has arc length approximately r\,\Delta\theta (radians times radius, §0.4), so the small region has area approximately

\Delta A\approx r\,\Delta r\,\Delta\theta

This matches §6.3's polar area formula A=\frac12\int r^2\,d\theta exactly at the level of the infinitesimal piece — that formula came from summing sector areas \frac12r^2\,d\theta; here, the same sector geometry produces the area element r\,dr\,d\theta that a double integral needs, one layer more granular (varying in r as well as \theta, rather than integrating radius away first).

Converting a double integral to polar

\iint_Rf(x,y)\,dA=\iint_Rf(r\cos\theta,r\sin\theta)\,r\,dr\,d\theta

Substitute x=r\cos\theta, y=r\sin\theta everywhere inside f, convert the boundary description of R into r- and \theta-limits (exactly §6.2's curve-to-polar translation), and — critically — multiply by the extra factor of r. Forgetting that factor is the single most common error when switching to polar double integrals; it is not optional notation, it's the actual area element, without which the integral computes the wrong quantity entirely.

When polar coordinates help

Two signals suggest switching: a circular (or annular, or wedge-shaped) region — a disk x^2+y^2\le R^2 becomes the trivially simple bounds 0\le r\le R, 0\le\theta\le2\pi — and an integrand involving x^2+y^2, which collapses to r^2 immediately via the Pythagorean identity (§0.4), often turning an intractable Cartesian integrand into something elementary.

The signature application: the Gaussian integral

\int_{-\infty}^\infty e^{-x^2}\,dx

has no elementary antiderivative — flagged already in §4.10 as an integral only numerical methods could handle directly. Polar double integrals crack it with a classic trick: square it, treating the two copies as x and y integrals of the same function, then combine into one double integral over the entire plane:

\left(\int_{-\infty}^\infty e^{-x^2}dx\right)^2=\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-x^2}e^{-y^2}\,dx\,dy=\iint_{\mathbb R^2}e^{-(x^2+y^2)}\,dA

Converting to polar (x^2+y^2=r^2, and the whole plane is 0\le r<\infty, 0\le\theta<2\pi):

=\int_0^{2\pi}\int_0^\infty e^{-r^2}\,r\,dr\,d\theta

The inner integral is now elementary — substitute u=r^2, du=2r\,dr (§4.5):

\int_0^\infty e^{-r^2}r\,dr=\left[-\frac12e^{-r^2}\right]_0^\infty=0-\left(-\frac12\right)=\frac12

\int_0^{2\pi}\frac12\,d\theta=\pi

\left(\int_{-\infty}^\infty e^{-x^2}dx\right)^2=\pi\ \Longrightarrow\ \int_{-\infty}^\infty e^{-x^2}dx=\sqrt\pi

This closes a loose thread from §4.10 and §7's probability-density lesson (§5.7): the improper integral with no elementary antiderivative now has an exact closed-form value, found only because the polar area element r\,dr\,d\theta turned an intractable e^{-x^2} into a trivially-integrable r\,e^{-r^2}.

Doing it in Python

The Gaussian integral computed via the polar double-integral trick:

import sympy as sp

r, theta = sp.symbols('r theta', positive=True)

inner = sp.integrate(sp.exp(-r**2) * r, (r, 0, sp.oo))
full = sp.integrate(inner, (theta, 0, 2*sp.pi))
print(f"double integral over the whole plane = {full}")
print(f"so the original integral = sqrt({full}) = {sp.sqrt(full)}")

The volume of a hemisphere, computed by converting a disk-region double integral to polar — an integral that would be far more awkward in Cartesian coordinates:

import sympy as sp

r, theta, R = sp.symbols('r theta R', positive=True)

# z = sqrt(R^2 - x^2 - y^2) over the disk x^2+y^2 <= R^2, i.e. r <= R
volume = sp.integrate(sp.integrate(sp.sqrt(R**2 - r**2) * r, (r, 0, R)), (theta, 0, 2*sp.pi))
print(f"hemisphere volume formula: {sp.simplify(volume)}")
print(f"at R=3: {volume.subs(R, 3)}")
print(f"matches the standard geometry formula (2/3)*pi*R^3: {sp.Rational(2,3)*sp.pi*3**3}")

Converting a Cartesian double integral over a disk to polar, step by step:

import sympy as sp

x, y, r, theta = sp.symbols('x y r theta', positive=True)
f_cartesian = x**2 + y**2

f_polar = f_cartesian.subs({x: r*sp.cos(theta), y: r*sp.sin(theta)})
f_polar = sp.simplify(f_polar)
print(f"f(x,y) = x^2+y^2 becomes f(r,theta) = {f_polar}   (collapses immediately)")

result = sp.integrate(sp.integrate(f_polar * r, (r, 0, 2)), (theta, 0, 2*sp.pi))
print(f"integral over the disk of radius 2: {result}")

Worked example

Evaluate \displaystyle\iint_Re^{-(x^2+y^2)}\,dA over the disk R=\{x^2+y^2\le4\}, using polar coordinates.

The disk becomes 0\le r\le2, 0\le\theta\le2\pi, and the integrand becomes e^{-r^2}:

\iint_Re^{-(x^2+y^2)}\,dA=\int_0^{2\pi}\int_0^2e^{-r^2}\,r\,dr\,d\theta

Inner integral, u=r^2:

\int_0^2e^{-r^2}r\,dr=\left[-\frac12e^{-r^2}\right]_0^2=-\frac12e^{-4}+\frac12=\frac12\big(1-e^{-4}\big)

\int_0^{2\pi}\frac12\big(1-e^{-4}\big)\,d\theta=2\pi\cdot\frac12\big(1-e^{-4}\big)=\boxed{\pi\big(1-e^{-4}\big)}

Sanity check. As the disk's radius grows toward infinity, e^{-4}\to0 and this should approach the full-plane Gaussian result of \pi found above — and indeed \pi(1-e^{-4})\approx\pi(1-0.0183)\approx\pi(0.9817), already extremely close to \pi with a disk of radius just 2, since e^{-r^2} decays so fast that almost all of the "volume" is already captured within a modest radius. ✓

Your turn

1. Evaluate \displaystyle\iint_R(x^2+y^2)\,dA over the disk x^2+y^2\le1, using polar coordinates.

2. Set up (in polar coordinates, don't necessarily finish by hand) the integral for the volume under z=x^2+y^2 over the annulus 1\le x^2+y^2\le4.

3. True or false: converting \iint_Rf(x,y)\,dA to polar coordinates only ever requires substituting x=r\cos\theta, y=r\sin\theta into f — no other change to the integral is needed.

Solutions

1. x^2+y^2=r^2; disk is 0\le r\le1, 0\le\theta\le2\pi.

\int_0^{2\pi}\int_0^1r^2\cdot r\,dr\,d\theta=\int_0^{2\pi}\int_0^1r^3\,dr\,d\theta=\int_0^{2\pi}\frac14\,d\theta=\boxed{\frac\pi2}

2. The annulus is 1\le r\le2, 0\le\theta\le2\pi, and z=x^2+y^2=r^2:

V=\int_0^{2\pi}\int_1^2r^2\cdot r\,dr\,d\theta=\int_0^{2\pi}\int_1^2r^3\,dr\,d\theta

3. False. This is exactly the common mistake the concept section warns about: the integrand substitution alone is not enough — the extra factor of r from the area element dA=r\,dr\,d\theta must also be inserted, and the region's boundary must be re-expressed in terms of r and \theta. Skipping the factor of r produces a number with no correct geometric meaning, even though every other step might look superficially right.

Check yourself in code

Using the polar double-integral trick, compute \iint_{\mathbb R^2}e^{-(x^2+y^2)}\,dA and use it to find \int_{-\infty}^\infty e^{-x^2}\,dx.

Print exactly this:

double integral over the plane = pi
so the Gaussian integral = sqrt(pi)
import sympy as sp

r, theta = sp.symbols('r theta', positive=True)

inner = sp.integrate(sp.exp(-r**2) * r, (r, 0, sp.oo))
full = sp.integrate(inner, (theta, 0, 2*sp.pi))
print("double integral over the plane = ...")
print("so the Gaussian integral = ...")
import sympy as sp

r, theta = sp.symbols('r theta', positive=True)

inner = sp.integrate(sp.exp(-r**2) * r, (r, 0, sp.oo))
full = sp.integrate(inner, (theta, 0, 2*sp.pi))
print(f"double integral over the plane = {full}")
print(f"so the Gaussian integral = {sp.sqrt(full)}")

Switching a double integral to polar coordinates multiplies the integrand by r — the polar area element dA=r\,dr\,d\theta, derived from the same sector-area geometry as §6.3 — and it's the tool that finally cracks the Gaussian integral \int e^{-x^2}dx, an integral §4.10 could only ever handle numerically, by squaring it into a polar double integral where the extra factor of r makes the substitution u=r^2 trivial. Circular regions and integrands built from x^2+y^2 are the two reliable signals that polar is the right coordinate system to reach for.

Next: putting the polar-double-integral machinery to work computing mass, center of mass, and moments for regions of non-uniform density — the two-variable generalization of §5.5's centroid formulas.