Multivariable Calculus · Spherical coordinates

Spherical coordinates

Spherical coordinates (ρ, θ, φ) give a point’s distance ρ from the origin, the angle θ of its projection on the xy-plane, measured from the positive x-axis toward the positive y-axis, and the angle φ down from the positive z-axis: x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ.

Spherical coordinates in this visualization

In spherical coordinates (ρ,θ,φ)(\rho, \theta, \varphi), the angle φ\varphi is measured down from the positive z-axis to the segment OPOP, from 0∘0^\circ straight up to 180∘180^\circ straight down. The angle θ\theta is the same as in cylindrical coordinates: the direction of PP’s projection onto the xy-plane, measured counterclockwise from the positive x-axis. The projection is r=ρsin⁡φr = \rho\sin\varphi from the origin and PP’s signed height is z=ρcos⁡φz = \rho\cos\varphi, which gives the conversion.

From spherical to Cartesian coordinates
x=ρsin⁡φcos⁡θ,y=ρsin⁡φsin⁡θ,z=ρcos⁡φ;ρ=x2+y2+z2x = \rho\sin\varphi\cos\theta,\quad y = \rho\sin\varphi\sin\theta,\quad z = \rho\cos\varphi; \qquad \rho = \sqrt{x^2 + y^2 + z^2}

A sphere, a half-plane and a cone

Fixing ρ>0\rho > 0 gives a sphere about the origin (ρ=0\rho = 0 leaves only the origin), fixing θ\theta a half-plane hinged on the z-axis, and fixing φ\varphi a cone with its tip at the origin. The cone opens upward for 0∘<φ<90∘0^\circ < \varphi < 90^\circ, flattens into the floor at 90∘90^\circ and opens downward for 90∘<φ<180∘90^\circ < \varphi < 180^\circ; at 0∘0^\circ and 180∘180^\circ it closes up into the positive and the negative half of the z-axis. Through each point off the axis run three coordinate lines: a ray from the origin, a circle of latitude, and a meridian half-circle joining the poles. On the z-axis every θ\theta names the same point, and at the origin every φ\varphi does too.

Where ρ² sin φ comes from

Step out by Δρ\Delta\rho, down by Δφ\Delta\varphi and round by Δθ\Delta\theta. The first edge of the small piece is Δρ\Delta\rho. The second is an arc of a circle of radius ρ\rho, so it is ρ Δφ\rho\,\Delta\varphi long, with the angle in radians (as in every formula here; the panel shows degrees). The third is an arc of the circle of latitude, whose radius is the distance to the z-axis, ρsin⁡φ\rho\sin\varphi: it is ρsin⁡φ Δθ\rho\sin\varphi\,\Delta\theta long. Their product is ρ2sin⁡φ Δρ Δθ Δφ\rho^2\sin\varphi\,\Delta\rho\,\Delta\theta\,\Delta\varphi. The exact volume differs because the factor ρ2sin⁡φ\rho^2\sin\varphi changes across the piece, but at a point with ρ>0\rho > 0 and 0∘<φ<180∘0^\circ < \varphi < 180^\circ the ratio goes to 1 as the three increments go to 0. Near a pole the circles of latitude are small, so the pieces are thin, and that is what the sin⁡φ\sin\varphi records. For a ball of radius RR, ∫0π ⁣∫02π ⁣∫0Rρ2sin⁡φ dρ dθ dφ=43πR3\int_0^{\pi}\!\int_0^{2\pi}\!\int_0^R \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi = \tfrac{4}{3}\pi R^3.

When to use them, and whose angles

Spherical coordinates suit problems arranged around a point, such as the field of a point charge. On a spherical model of the Earth, latitude is 90∘−φ90^\circ - \varphi. Watch the names. This page uses a common calculus convention, with θ\theta around the axis as in cylindrical coordinates. Physics books usually swap the two letters and write θ\theta for the angle from the z-axis and φ\varphi for the angle around it, so check the definition before using a formula.

Things to notice

  • ρ2sin⁡φ\rho^2\sin\varphi is the determinant of the Jacobian of (ρ,θ,φ)↦(x,y,z)(\rho, \theta, \varphi) \mapsto (x, y, z), up to sign; change of variables explains why that factor appears.
  • With ρ≥0\rho \ge 0, 0∘≤φ≤180∘0^\circ \le \varphi \le 180^\circ and 0∘≤θ<360∘0^\circ \le \theta < 360^\circ, every point off the z-axis has exactly one set of coordinates.

Controls

  • Drag P over its sphere to change θ and φ; change ρ on the panel. Drag anywhere else to turn the view.
  • The Δ knob scales Δρ, Δθ and Δφ by the same factor (1, 1/2, 1/4, 1/8); turning it shows the volume element. Near the south pole the piece stops at φ = 180°.

Related