# Spherical coordinates

In spherical or spatial polar coordinates , a point in three-dimensional space is specified by its distance from the origin and two angles .

In the case of points on a spherical surface ( sphere ) around the coordinate origin , the distance from the center of the sphere is constant. Then only the two angles are variable; they are then called spherical coordinates or spherical surface coordinates .

The term “spherical coordinates” can be seen as a generic term for the general case and the spherical coordinates. Like cylindrical coordinates, spherical coordinates are a generalization of the plane polar coordinates to three-dimensional Euclidean space . They can also be generalized further to spaces of any finite dimension.

## Usual convention

### definition

Spherical coordinates of a point and Cartesian coordinate system with the axes .${\ displaystyle r, \ theta, \ varphi}$${\ displaystyle P}$${\ displaystyle x, y, z}$

A spherical coordinate system in three-dimensional Euclidean space is determined by the choice

• of a center (origin),${\ displaystyle O}$
• a directed straight line through the center (polar axis), which indicates the pole direction (or zenith direction), and this defines the equatorial plane which runs through the center orthogonally to the pole direction, and
• a reference direction in the equatorial plane .

A Cartesian coordinate system is often used at the same time . Then the origin of the Cartesian coordinate system is typically chosen as the center, the z- axis as the polar axis (and thus the xy -plane as the equatorial plane) and the x -axis as the reference direction.

In the version of spherical coordinates that is common in mathematics and physics, a point is defined by the following three coordinates : ${\ displaystyle P}$

• ${\ displaystyle r}$, the radius , is the distance of the point from , this defines the sphere surface on which is located.${\ displaystyle P}$${\ displaystyle O}$${\ displaystyle P}$
• ${\ displaystyle \ theta}$or , the polar angle or pole distance angle , is the angle between the pole direction and the segment , counted from to (0 ° to 180 °), which defines the location of the point on a circular line on the spherical surface .${\ displaystyle \ vartheta}$${\ displaystyle OP}$${\ displaystyle 0}$${\ displaystyle \ pi}$${\ displaystyle P}$
• ${\ displaystyle \ varphi}$or , the azimuth angle , is the angle between the reference direction and the orthogonal projection of the line , counted from to (−180 ° to 180 °) or from 0 to (0 ° to 360 °) counterclockwise. This clearly defines the location of the point on the circular line.${\ displaystyle \ phi}$${\ displaystyle OP}$${\ displaystyle - \ pi}$${\ displaystyle \ pi}$${\ displaystyle 2 \ pi}$${\ displaystyle P}$

The illustration opposite shows a point with spherical coordinates . The two angle sizes and are also referred to as angle coordinates . ${\ displaystyle P}$${\ displaystyle (r, \ theta, \ varphi)}$${\ displaystyle \ theta}$${\ displaystyle \ varphi}$

### Conversions

A point in three-dimensional Euclidean space is assigned to each coordinate triple (parameterization). If you choose a Cartesian coordinate system as above, the assignment can be described by the following equations : ${\ displaystyle (r, \ theta, \ varphi)}$

${\ displaystyle {\ begin {array} {cll} x & = & r \ cdot \ sin \ theta \ cdot \ cos \ varphi \\ y & = & r \ cdot \ sin \ theta \ cdot \ sin \ varphi \\ z & = & r \ cdot \ cos \ theta \ end {array}}}$

Any number values can be used for , and in these equations . So that the spherical coordinates are clearly determined, the value range of the coordinates must be restricted. Usually the radius is limited to non-negative values, the angle to the interval or [0, 180 °] and the angle either to the interval or (−180 °, 180 °] or the interval or [0, 360 °) . Even then there are degenerate points for which the angular coordinates are not unique. For points on the z axis, the angle is not fixed, so it is arbitrary. For the origin is also arbitrary. In order to achieve clarity, one can define points for these points and additionally for the origin . ${\ displaystyle r}$${\ displaystyle \ theta}$${\ displaystyle \ varphi}$${\ displaystyle r}$${\ displaystyle \ theta}$ ${\ displaystyle [0, \ pi]}$${\ displaystyle \ varphi}$${\ displaystyle (- \ pi, \ pi]}$${\ displaystyle [0.2 \ pi)}$${\ displaystyle \ varphi}$${\ displaystyle \ theta}$${\ displaystyle \ varphi = 0}$${\ displaystyle \ theta = 0}$

For the other points, the spherical coordinates can be calculated from the Cartesian coordinates using the following equations: ${\ displaystyle (r, \ theta, \ varphi)}$${\ displaystyle (x, y, z)}$

${\ displaystyle {r} = {\ sqrt {x ^ {2} + y ^ {2} + z ^ {2}}}}$
${\ displaystyle {\ theta} = \ arccos {\ frac {z} {\ sqrt {x ^ {2} + y ^ {2} + z ^ {2}}}} \ = \ arccos {\ frac {z} {r}} \ = \ \ operatorname {arccot} {\ frac {z} {\ sqrt {x ^ {2} + y ^ {2}}}}}$
${\ displaystyle \ varphi = \ operatorname {atan2} (y, x) = {\ begin {cases} \ arctan \ left ({\ frac {y} {x}} \ right) & {\ text {, if}} x> 0, \\\ operatorname {sgn} (y) {\ frac {\ pi} {2}} & {\ text {, if}} x = 0, \\\ arctan \ left ({\ frac {y } {x}} \ right) + \ pi & {\ text {, if}} x <0 \ land y \ geq 0, \\\ arctan \ left ({\ frac {y} {x}} \ right) - \ pi & {\ text {, if}} x <0 \ land y <0. \ end {cases}}}$

The equations given for the angle apply when choosing between and . If you choose between 0 and , they can be modified appropriately. ${\ displaystyle \ varphi}$${\ displaystyle \ varphi}$${\ displaystyle - \ pi}$${\ displaystyle \ pi}$${\ displaystyle \ varphi}$${\ displaystyle 2 \ pi}$

In analysis and its applications, spherical coordinate angles are usually given in radians .

## Applications

Spherical coordinates are often used when examining systems that are rotationally symmetrical about a point. Examples are: Volume integrals over spheres, the description and investigation of rotationally symmetrical force fields , such as B. the gravitational field of a spherical celestial body, the electric field of a point charge or a charged sphere. The sizes considered then do not depend on the angular coordinates, which simplifies many formulas. Important partial differential equations such as the Laplace equation or the Helmholtz equation can be solved in spherical coordinates by separating the variables .

## Other conventions

The above choice of coordinates is international consensus in theoretical physics . Sometimes the characters and are used in the opposite sense, especially in American literature. ${\ displaystyle \ theta}$${\ displaystyle \ varphi}$

The polar angle is not the latitude , but blends with the Colatitude identify. The geographical latitude is the angle between the equatorial plane and the position vector and has values ​​between and . If it is marked with , then it is . On the other hand, the one used above can easily be equated with the geographical longitude east of Greenwich (see geographical coordinates ). ${\ displaystyle \ theta}$${\ displaystyle -90 ^ {\ circ}}$${\ displaystyle 90 ^ {\ circ}}$${\ displaystyle \ phi}$${\ displaystyle \ phi = 90 ^ {\ circ} - \ theta, \ theta = 90 ^ {\ circ} - \ phi}$${\ displaystyle \ varphi}$ ${\ displaystyle \ lambda}$

The above construction is in some respects inconsistent with the construction of the plane polar coordinates. For some problems it is more practical to use the representation

${\ displaystyle x = r \ cos \ phi \, \ cos \ varphi}$
${\ displaystyle y = r \ cos \ phi \, \ sin \ varphi}$
${\ displaystyle z = r \ sin \ phi \ quad}$

to use. In this representation corresponds to the geographical latitude. ${\ displaystyle \ phi}$

The reverse transformation of the point or vector into the angle components then takes place with ${\ displaystyle {\ vec {p}}}$

${\ displaystyle \ phi = \ arcsin (z / r)}$
${\ displaystyle \ varphi = \ operatorname {atan2} (y, x)}$,

whereby . ${\ displaystyle r = | {\ vec {p}} |}$

## Transformation of differentials

### Jacobian matrix

The local properties of the coordinate transformation are described by the Jacobi matrix . For the transformation of spherical coordinates into Cartesian coordinates this is

${\ displaystyle J = {\ frac {\ partial (x, y, z)} {\ partial (r, \ theta, \ varphi)}} = {\ begin {pmatrix} \ sin \ theta \ cos \ varphi & r \ cos \ theta \ cos \ varphi & -r \ sin \ theta \ sin \ varphi \\\ sin \ theta \ sin \ varphi & r \ cos \ theta \ sin \ varphi & r \ sin \ theta \ cos \ varphi \\\ cos \ theta & -r \ sin \ theta & 0 \ end {pmatrix}}.}$

The corresponding functional determinant is:

${\ displaystyle \ det J = r ^ {2} \ sin \ theta}$

The easiest way to calculate the Jacobi matrix of the opposite transformation is as the inverse of : ${\ displaystyle J}$

${\ displaystyle J ^ {- 1} = {\ frac {\ partial (r, \ theta, \ varphi)} {\ partial (x, y, z)}} = {\ begin {pmatrix} \ sin \ theta \ cos \ varphi & \ sin \ theta \ sin \ varphi & \ cos \ theta \\ {\ frac {1} {r}} \ cos \ theta \ cos \ varphi & {\ frac {1} {r}} \ cos \ theta \ sin \ varphi & - {\ frac {1} {r}} \ sin \ theta \\ - {\ frac {1} {r}} {\ frac {\ sin \ varphi} {\ sin \ theta} } & {\ frac {1} {r}} {\ frac {\ cos \ varphi} {\ sin \ theta}} & 0 \ end {pmatrix}}.}$

Some components of this matrix are fractions , at whose denominators one recognizes the ambiguity of the polar coordinates at and at (i.e. or ). The representation in Cartesian coordinates is less common: ${\ displaystyle \ textstyle r = 0}$${\ displaystyle \ textstyle \ sin \ theta = 0}$${\ displaystyle \ textstyle \ theta = 0}$${\ displaystyle \ textstyle \ pi}$

${\ displaystyle J ^ {- 1} = {\ begin {pmatrix} {\ frac {x} {r}} & {\ frac {y} {r}} & {\ frac {z} {r}} \\ \\ {\ frac {xz} {r ^ {2} {\ sqrt {x ^ {2} + y ^ {2}}}}} & {\ frac {yz} {r ^ {2} {\ sqrt { x ^ {2} + y ^ {2}}}}} & {\ frac {- (x ^ {2} + y ^ {2})} {r ^ {2} {\ sqrt {x ^ {2} + y ^ {2}}}}} \\\\ {\ frac {-y} {x ^ {2} + y ^ {2}}} & {\ frac {x} {x ^ {2} + y ^ {2}}} & 0 \ end {pmatrix}}.}$

### Differentials, volume element, surface element, line element

The Jacobi matrix allows the conversion of differentials to be written clearly as a linear map:

${\ displaystyle {\ begin {pmatrix} \ mathrm {d} x \\\ mathrm {d} y \\\ mathrm {d} z \ end {pmatrix}} = J \ cdot {\ begin {pmatrix} \ mathrm { d} r \\\ mathrm {d} \ theta \\\ mathrm {d} \ varphi \ end {pmatrix}}}$

respectively

${\ displaystyle {\ begin {pmatrix} \ mathrm {d} r \\\ mathrm {d} \ theta \\\ mathrm {d} \ varphi \ end {pmatrix}} = J ^ {- 1} \ cdot {\ begin {pmatrix} \ mathrm {d} x \\\ mathrm {d} y \\\ mathrm {d} z \ end {pmatrix}}}$.

The volume element can be made particularly simple with the aid of the functional determinant${\ displaystyle \ mathrm {d} V = \ mathrm {d} x \, \ mathrm {d} y \, \ mathrm {d} z}$

${\ displaystyle \ det J = r ^ {2} \ sin \ theta}$

convert:

${\ displaystyle \, \ mathrm {d} V = r ^ {2} \ sin \ theta \, \ mathrm {d} \ varphi \, \ mathrm {d} \ theta \, \ mathrm {d} r}$.

Differentiation gives the surface element on a sphere with a radius${\ displaystyle {\ frac {\ mathrm {d} V} {\ mathrm {d} r}}}$${\ displaystyle \ mathrm {d} A}$${\ displaystyle r}$

${\ displaystyle \ mathrm {d} A = r ^ {2} \ sin \ theta \, \ mathrm {d} \ varphi \, \ mathrm {d} \ theta}$.

The line element is calculated according to ${\ displaystyle ds}$

${\ displaystyle \ mathrm {d} s ^ {2} = \ mathrm {d} x ^ {2} + \ mathrm {d} y ^ {2} + \ mathrm {d} z ^ {2} = \ mathrm { d} r ^ {2} + r ^ {2} \ mathrm {d} \ theta ^ {2} + r ^ {2} \ sin ^ {2} \ theta \ mathrm {d} \ varphi ^ {2}}$

### Metric and rotation matrix

The absence of mixed terms in the line element reflects that the metric tensor${\ displaystyle \ mathrm {d} s}$

${\ displaystyle g = J ^ {T} J = {\ begin {pmatrix} 1 & 0 & 0 \\ 0 & r ^ {2} & 0 \\ 0 & 0 & r ^ {2} \ sin ^ {2} \ theta \ end {pmatrix}}}$

has no off-diagonal elements even in spherical coordinates.

The metric tensor is obviously the square of the diagonal matrix

${\ displaystyle h = \ operatorname {diag} (1, r, r \ sin \ theta)}$.

With the help of this matrix the Jacobi matrix can be written as, whereby the rotation matrix${\ displaystyle J = Sh}$${\ displaystyle S}$

${\ displaystyle S = {\ begin {pmatrix} \ sin \ theta \ cos \ varphi & \ cos \ theta \ cos \ varphi & - \ sin \ varphi \\\ sin \ theta \ sin \ varphi & \ cos \ theta \ sin \ varphi & \ cos \ varphi \\\ cos \ theta & - \ sin \ theta & 0 \ end {pmatrix}}}$

is.

## Transformation of vector fields and operators

Spherical coordinates with an associated orthogonal base that is dependent on the location ${\ displaystyle \ mathbf {e} _ {r}, \ mathbf {e} _ {\ theta}, \ mathbf {e} _ {\ varphi}}$

In the following, the transformation of vectors and differential operators is shown as an example. The results are preferably written in compact form using transformation matrices. Most statements and formulas only apply to points outside the z -axis for which the Jacobi determinant is not equal to zero.

### Transformation of the vector space basis

The base vector for the coordinate specifies the direction in which a point moves when the coordinate is changed by an infinitesimal amount : ${\ displaystyle \ mathbf {e} _ {\ varphi}}$${\ displaystyle \ varphi}$${\ displaystyle P (r, \ theta, \ varphi)}$${\ displaystyle \ varphi}$${\ displaystyle d \ varphi}$

${\ displaystyle \ mathbf {e} _ {\ varphi} \ sim {\ frac {\ partial \ mathrm {P}} {\ partial \ varphi}}}$.

From this you get

${\ displaystyle \ mathbf {e} _ {\ varphi} \ sim {\ frac {\ partial \ mathrm {P}} {\ partial \ varphi}} = {\ frac {\ partial x} {\ partial \ varphi}} \ mathbf {e} _ {x} + {\ frac {\ partial y} {\ partial \ varphi}} \ mathbf {e} _ {y} + {\ frac {\ partial z} {\ partial \ varphi}} \ mathbf {e} _ {z} = - r \ sin \ theta \ sin \ varphi \ mathbf {e} _ {x} + r \ sin \ theta \ cos \ varphi \ mathbf {e} _ {y}}$.

To get an orthonormal basis, you have to normalize to the length : ${\ displaystyle e _ {\ varphi}}$${\ displaystyle 1}$

${\ displaystyle \ mathbf {e} _ {\ varphi} = - \ sin \ varphi \, \ mathbf {e} _ {x} + \ cos \ varphi \, \ mathbf {e} _ {y}}$.

The basis vectors and are obtained in the same way : ${\ displaystyle e_ {r}}$${\ displaystyle e _ {\ theta}}$

${\ displaystyle \ mathbf {e} _ {r} = \ sin \ theta \ cos \ varphi \, \ mathbf {e} _ {x} + \ sin \ theta \ sin \ varphi \, \ mathbf {e} _ { y} + \ cos \ theta \, \ mathbf {e} _ {z}}$
${\ displaystyle \ mathbf {e} _ {\ theta} = \ cos \ theta \ cos \ varphi \, \ mathbf {e} _ {x} + \ cos \ theta \ sin \ varphi \, \ mathbf {e} _ {y} - \ sin \ theta \, \ mathbf {e} _ {z}}$

Written as column vectors :

${\ displaystyle \ mathbf {e} _ {r} = {\ begin {pmatrix} \ sin \ theta \ cos \ varphi \\\ sin \ theta \ sin \ varphi \\\ cos \ theta \ end {pmatrix}}, \ qquad \ mathbf {e} _ {\ theta} = {\ begin {pmatrix} \ cos \ theta \ cos \ varphi \\\ cos \ theta \ sin \ varphi \\ - \ sin \ theta \ end {pmatrix}} , \ qquad \ mathbf {e} _ {\ varphi} = {\ begin {pmatrix} - \ sin \ varphi \\\ cos \ varphi \\ 0 \ end {pmatrix}}}$

These basis vectors form a legal system in the sequence . ${\ displaystyle \ mathbf {e} _ {r}, \ mathbf {e} _ {\ theta}, \ mathbf {e} _ {\ varphi}}$

The associated directions are also called radial , meridional and azimuthal . These terms not only play a central role in astronomy and the geosciences (e.g. geography , geology or geophysics ), but also in mathematics , physics and various engineering sciences , for example in the emission of electromagnetic waves (" Hertzian dipole ") an antenna spanned in the z direction, where the radiation takes place in the radial direction, while the electric or magnetic field oscillates in the meridional or azimuthal direction.

With the help of the rotation matrix introduced above , the transformations can also be represented in compact form: ${\ displaystyle S}$

${\ displaystyle (\ mathbf {e} _ {r}, \ mathbf {e} _ {\ theta}, \ mathbf {e} _ {\ varphi}) = (\ mathbf {e} _ {x}, \ mathbf {e} _ {y}, \ mathbf {e} _ {z}) \ cdot S}$ .

In the opposite direction the equations are then:

${\ displaystyle (\ mathbf {e} _ {x}, \ mathbf {e} _ {y}, \ mathbf {e} _ {z}) = (\ mathbf {e} _ {r}, \ mathbf {e } _ {\ theta}, \ mathbf {e} _ {\ varphi}) \ cdot S ^ {T}}$.

(It is used that is orthogonal and therefore .) ${\ displaystyle S}$${\ displaystyle S ^ {- 1} = S ^ {T}}$

### Transformation of a vector field

A vector , as a geometric object, must be independent of the coordinate system:

${\ displaystyle A_ {x} \ mathbf {e} _ {x} + A_ {y} \ mathbf {e} _ {y} + A_ {z} \ mathbf {e} _ {z} = \ mathbf {A} = A_ {r} \ mathbf {e} _ {r} + A _ {\ theta} \ mathbf {e} _ {\ theta} + A _ {\ varphi} \ mathbf {e} _ {\ varphi}.}$

This condition is met by

${\ displaystyle {\ begin {pmatrix} A_ {x} \\ A_ {y} \\ A_ {z} \ end {pmatrix}} = S \ cdot {\ begin {pmatrix} A_ {r} \\ A _ {\ theta} \\ A _ {\ varphi} \ end {pmatrix}}}$   respectively   .${\ displaystyle {\ begin {pmatrix} A_ {r} \\ A _ {\ theta} \\ A _ {\ varphi} \ end {pmatrix}} = S ^ {T} \ cdot {\ begin {pmatrix} A_ {x } \\ A_ {y} \\ A_ {z} \ end {pmatrix}}}$

### Transformation of the partial derivatives

The partial derivatives transform like the basis vectors, but without normalization. You can calculate exactly as above, only you omit the point in the numerator (in fact, in the modern formulation of differential geometry, the coordinate basis vectors of the tangent space and the partial derivatives are equated) and the Jacobi matrix is ​​used instead of the rotation matrix . So the transformation is: ${\ displaystyle P}$ ${\ displaystyle J = Sh}$${\ displaystyle S}$

${\ displaystyle \ left ({\ frac {\ partial} {\ partial r}}, {\ frac {\ partial} {\ partial \ theta}}, {\ frac {\ partial} {\ partial \ varphi}} \ right) = \ left ({\ frac {\ partial} {\ partial x}}, {\ frac {\ partial} {\ partial y}}, {\ frac {\ partial} {\ partial z}} \ right) \ cdot J}$,

and in the opposite direction

${\ displaystyle \ left ({\ frac {\ partial} {\ partial x}}, {\ frac {\ partial} {\ partial y}}, {\ frac {\ partial} {\ partial z}} \ right) = \ left ({\ frac {\ partial} {\ partial r}}, {\ frac {\ partial} {\ partial \ theta}}, {\ frac {\ partial} {\ partial \ varphi}} \ right) \ cdot J ^ {- 1}}$.

### Transformation of the Nabla operator

The Nabla operator has the simple form only in Cartesian coordinates ${\ displaystyle \ nabla}$

${\ displaystyle \ mathbf {\ nabla} = \ mathbf {e} _ {x} {\ frac {\ partial} {\ partial x}} + \ mathbf {e} _ {y} {\ frac {\ partial} { \ partial y}} + \ mathbf {e} _ {z} {\ frac {\ partial} {\ partial z}}}$.

Both the partial derivatives and the unit vectors have to be transformed in the manner derived above. One finds:

${\ displaystyle \ mathbf {\ nabla} = \ mathbf {e} _ {r} {\ frac {\ partial} {\ partial r}} + \ mathbf {e} _ {\ theta} {\ frac {1} { r}} {\ frac {\ partial} {\ partial \ theta}} + \ mathbf {e} _ {\ varphi} {\ frac {1} {r \ sin \ theta}} {\ frac {\ partial} { \ partial \ varphi}}}$.

In this form, the transformed Nabla operator can be used directly to calculate the gradient of a scalar field given in spherical coordinates.

In order to calculate the divergence of a vector field A given in spherical coordinates , however, it must be taken into account that not only acts on the coefficients , but also on the basis vectors implicitly contained in A.${\ displaystyle \ nabla}$${\ displaystyle A_ {r}, A _ {\ theta}, A _ {\ varphi}}$${\ displaystyle \ mathbf {e} _ {r}, \ mathbf {e} _ {\ theta}, \ mathbf {e} _ {\ varphi}}$

${\ displaystyle \ mathbf {\ nabla} \ cdot \ mathbf {A} = {\ frac {1} {r ^ {2}}} {\ frac {\ partial} {\ partial r}} (r ^ {2} A_ {r}) + {\ frac {1} {r \ sin \ theta}} {\ frac {\ partial} {\ partial \ theta}} (\ sin \ theta A _ {\ theta}) + {\ frac { 1} {r \ sin \ theta}} {\ frac {\ partial} {\ partial \ varphi}} A _ {\ varphi}.}$

In order to calculate the rotation of a vector field A given in spherical coordinates , the same must be taken into account:

${\ displaystyle \ mathbf {\ nabla} \ times \ mathbf {A} = {1 \ over r \ sin \ theta} \ left ({\ partial \ over \ partial \ theta} (A _ {\ varphi} \ sin \ theta ) - {\ partial A _ {\ theta} \ over \ partial \ varphi} \ right) \ mathbf {e} _ {r} + {1 \ over r} \ left ({1 \ over \ sin \ theta} {\ partial A_ {r} \ over \ partial \ varphi} - {\ partial \ over \ partial r} (rA _ {\ varphi}) \ right) \ mathbf {e} _ {\ theta} + {1 \ over r} \ left ({\ partial \ over \ partial r} (rA _ {\ theta}) - {\ partial A_ {r} \ over \ partial \ theta} \ right) \ mathbf {e} _ {\ varphi}}$

### Transformation of the Laplace operator

If one uses the gradient operator as the vector field A in the divergence formula, one finds the Laplace operator${\ displaystyle \ nabla}$

${\ displaystyle \ mathbf {\ Delta} = \ mathbf {\ nabla} ^ {2} = {\ frac {1} {r ^ {2}}} {\ frac {\ partial} {\ partial r}} \ left (r ^ {2} {\ frac {\ partial} {\ partial r}} \ right) + {\ frac {1} {r ^ {2} \ sin \ theta}} {\ frac {\ partial} {\ partial \ theta}} \ left (\ sin \ theta {\ frac {\ partial} {\ partial \ theta}} \ right) + {\ frac {1} {r ^ {2} \ sin ^ {2} \ theta }} {\ frac {\ partial ^ {2}} {\ partial \ varphi ^ {2}}}}$.

or.

${\ displaystyle \ mathbf {\ Delta} = {\ frac {\ partial ^ {2}} {\ partial r ^ {2}}} + {\ frac {2} {r}} {\ frac {\ partial} { \ partial r}} + {\ frac {1} {r ^ {2}}} {\ frac {\ partial ^ {2}} {\ partial \ theta ^ {2}}} + {\ frac {1} { r ^ {2}}} {\ frac {\ cos \ theta} {\ sin \ theta}} {\ frac {\ partial} {\ partial \ theta}} + {\ frac {1} {r ^ {2} \ sin ^ {2} \ theta}} {\ frac {\ partial ^ {2}} {\ partial \ varphi ^ {2}}}}$.

## Generalization to n-dimensional spherical coordinates

A generalization of spherical coordinates to dimensions: ${\ displaystyle n}$

{\ displaystyle {\ begin {aligned} x_ {1} & = r \ cos (\ phi _ {1}) \\ x_ {2} & = r \ sin (\ phi _ {1}) \ cos (\ phi _ {2}) \\ x_ {3} & = r \ sin (\ phi _ {1}) \ sin (\ phi _ {2}) \ cos (\ phi _ {3}) \\ & {} \ , \, \, \ vdots \\ x_ {n-1} & = r \ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ cos (\ phi _ {n -1}) \\ x_ {n} & = r \ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ sin (\ phi _ {n-1}) \ end {aligned}}}

The angles develop according to:

{\ displaystyle {\ begin {aligned} \ tan (\ phi _ {n-1}) & = {\ frac {x_ {n}} {x_ {n-1}}} \\\ tan (\ phi _ { n-2}) & = {\ frac {\ sqrt {{x_ {n}} ^ {2} + {x_ {n-1}} ^ {2}}} {x_ {n-2}}} \\ & {} \, \, \, \ vdots \\\ tan (\ phi _ {1}) & = {\ frac {\ sqrt {{x_ {n}} ^ {2} + {x_ {n-1} } ^ {2} + \ cdots + {x_ {2}} ^ {2}}} {x_ {1}}} \ end {aligned}}}

Renumbering gives a recursion formula for the angles:

{\ displaystyle {\ begin {aligned} x_ {n} & = r \ cos (\ phi _ {n-1}) \\ x_ {n-1} & = r \ sin (\ phi _ {n-1} ) \ cos (\ phi _ {n-2}) \\ x_ {n-2} & = r \ sin (\ phi _ {n-1}) \ sin (\ phi _ {n-2}) \ cos (\ phi _ {n-3}) \\ & {} \, \, \, \ vdots \\ x_ {2} & = r \ sin (\ phi _ {n-1}) \ cdots \ sin (\ phi _ {2}) \ cos (\ phi _ {1}) \\ x_ {1} & = r \ sin (\ phi _ {n-1}) \ cdots \ sin (\ phi _ {2}) \ sin (\ phi _ {1}) \ end {aligned}}}

What the following angles result from:

${\ displaystyle \ left \ Vert {\ vec {L}} _ {k} \ right \ Vert = \ operatorname {sgn} (x_ {k}) {\ sqrt {x_ {k} ^ {2} + \ left \ Vert {\ vec {L}} _ {k-1} \ right \ Vert ^ {2}}} = {\ frac {x_ {k}} {\ left \ Vert x_ {k} \ right \ Vert}} { \ sqrt {x_ {k} ^ {2} + \ left \ Vert {\ vec {L}} _ {k-1} \ right \ Vert ^ {2}}}}$

with and ${\ displaystyle \ left \ Vert {\ vec {L}} _ {0} \ right \ Vert = 0}$

${\ displaystyle \ tan (\ phi _ {k}) = {\ frac {\ sqrt {x_ {k} ^ {2} + \ left \ Vert {\ vec {L}} _ {k-1} \ right \ Vert ^ {2}}} {x_ {k + 1}}} = {\ frac {\ left \ Vert {\ vec {L}} _ {k} \ right \ Vert} {x_ {k + 1}}} }$

${\ displaystyle r = \ left \ Vert {\ vec {L}} _ {n} \ right \ Vert}$

A case distinction provides the appropriate angle to the given Cartesian coordinate using an arctangent , where : ${\ displaystyle \ arctan (\ pm \, \ infty) = \ pm \, {\ tfrac {\ pi} {2}}}$

{\ displaystyle {\ begin {aligned} \ phi _ {k} = {\ begin {cases} \ arctan \ left ({\ frac {\ left \ Vert {\ vec {L}} _ {k} \ right \ Vert } {x_ {k + 1}}} \ right) + \ pi, & {\ text {(1) if:}} x_ {k + 1} <0 \; \ land \; k = n-1 \\ \ arctan \ left ({\ frac {\ left \ Vert {\ vec {L}} _ {k} \ right \ Vert} {x_ {k + 1}}} \ right), & {\ text {(2) if:}} {\ text {not (1)}} \ land \; {\ text {not (3)}} \\ 0, & {\ text {(3) if:}} x_ {k + 1} = \ left \ Vert {\ vec {L}} _ {k} \ right \ Vert = 0 \\\ end {cases}} \ end {aligned}}}

It is noticeable that there is always a two-dimensional vector for . {\ displaystyle {\ begin {aligned} {\ vec {L}} _ {k} \ end {aligned}}}{\ displaystyle {\ begin {aligned} k> 0 \ end {aligned}}}

### Jacobian matrix

The Jacobi matrix of the spherical coordinates is with respect to the numbering given above:

${\ displaystyle J = \ left ({\ begin {matrix} \ cos (\ phi _ {1}) & - r \ sin (\ phi _ {1}) & 0 & 0 & \ cdots & 0 \\\ sin (\ phi _ { 1}) \ cos (\ phi _ {2}) & r \ cos (\ phi _ {1}) \ cos (\ phi _ {2}) & - r \ sin (\ phi _ {1}) \ sin ( \ phi _ {2}) & 0 & \ cdots & 0 \\\ vdots & \ vdots & \ ddots & \ ddots & \ ddots & \ vdots \\\ vdots & \ vdots & \ ddots & \ ddots & \ ddots & 0 \\\ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ cos (\ phi _ {n-1}) & r \ cos (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ cos (\ phi _ {n-1}) & \ cdots & \ cdots & \ cdots & -r \ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ sin (\ phi _ {n-1}) \\\ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ sin (\ phi _ {n-1}) & r \ cos (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ sin (\ phi _ {n-1}) & \ cdots & \ cdots & \ cdots & r \ sin (\ phi _ {1}) \ cdots \ sin (\ phi _ {n-2}) \ cos (\ phi _ {n-1}) \ end {matrix}} \ right) }$

Their determinant is:

${\ displaystyle \ det J _ {(n)} = r ^ {n-1} \ sin (\ phi _ {1}) ^ {n-2} \ sin (\ phi _ {2}) ^ {n-3 } \ cdots \ sin (\ phi _ {n-2}) = \ displaystyle r ^ {n-1} \ cdot \ prod _ {k = 2} ^ {n-1} \ left (\ sin (\ phi _ {nk}) \ right) ^ {k-1} \ quad n \ geq 2}$

The integral over the amount of this determinant can be given with the gamma function . ${\ displaystyle \ Gamma}$

${\ displaystyle \ int _ {0} ^ {R} \ int _ {0} ^ {2 \ pi} \ int _ {0} ^ {\ pi} \ dots \ int _ {0} ^ {\ pi} | \ det J _ {(n)} | \, {\ text {d}} \ phi _ {1} \ dots {\ text {d}} \ phi _ {n-2} {\ text {d}} \ phi _ {n-1} {\ text {d}} r = {\ frac {2 \ pi R ^ {n}} {n}} \ cdot \ prod _ {k = 2} ^ {n-1} \ int _ {0} ^ {\ pi} (\ sin (\ phi _ {nk})) ^ {k-1} {\ text {d}} \ phi _ {nk} = {\ frac {2 \ pi R ^ {n}} {n}} \ cdot \ prod _ {k = 2} ^ {n-1} {\ frac {{\ sqrt {\ pi}} \; \ Gamma \ left ({\ frac {k} { 2}} \ right)} {\ Gamma \ left ({\ frac {k + 1} {2}} \ right)}} = {\ frac {{\ sqrt {\ pi}} ^ {n} R ^ { n}} {\ Gamma \ left ({\ frac {n} {2}} + 1 \ right)}} \ quad n \ geq 2}$

This corresponds to the spherical volume of a -dimensional hypersphere : ${\ displaystyle n}$

${\ displaystyle V_ {n} (R) = {\ frac {{\ sqrt {\ pi}} ^ {n} R ^ {n}} {\ Gamma \ left ({\ frac {n} {2}} + 1 \ right)}}}$

#### Examples

2D:

${\ displaystyle \ int _ {0} ^ {R} \ int _ {0} ^ {2 \ pi} r \ mathrm {d} \ phi _ {1} \ mathrm {d} r = \ pi R ^ {2 }}$

3D:

${\ displaystyle \ int _ {0} ^ {R} \ int _ {0} ^ {2 \ pi} \ int _ {0} ^ {\ pi} r ^ {2} \ sin (\ phi _ {1} ) {\ text {d}} \ phi _ {1} {\ text {d}} \ phi _ {2} {\ text {d}} r = {\ frac {4 \ pi R ^ {3}} { 3}}}$

4D:

${\ displaystyle \ int _ {0} ^ {R} \ int _ {0} ^ {2 \ pi} \ int _ {0} ^ {\ pi} \ int _ {0} ^ {\ pi} r ^ { 3} \ sin ^ {2} (\ phi _ {1}) \ sin (\ phi _ {2}) {\ text {d}} \ phi _ {1} {\ text {d}} \ phi _ { 2} {\ text {d}} \ phi _ {3} {\ text {d}} r = {\ frac {\ pi ^ {2} R ^ {4}} {2}}}$

### example

Assignment using the example with the common coordinate axes : ${\ displaystyle n = 3}$${\ displaystyle x, y, z}$

{\ displaystyle {\ begin {aligned} x_ {3} & = z = r \ cos (\ phi _ {2}) \\ x_ {2} & = x = r \ sin (\ phi _ {2}) \ cos (\ phi _ {1}) \\ x_ {1} & = y = r \ sin (\ phi _ {2}) \ sin (\ phi _ {1}) \\\ end {aligned}}}

The angles are then:

{\ displaystyle {\ begin {aligned} \ tan (\ phi _ {2}) = {\ frac {\ left \ Vert {\ vec {L}} _ {2} \ right \ Vert} {x_ {3}} } & = {\ frac {\ sqrt {x_ {2} ^ {2} + x_ {1} ^ {2}}} {x_ {3}}} = {\ frac {\ sqrt {x ^ {2} + y ^ {2}}} {z}} \\\ tan (\ phi _ {1}) = {\ frac {\ left \ Vert {\ vec {L}} _ {1} \ right \ Vert} {x_ {2}}} & = {\ frac {\ sqrt {x_ {1} ^ {2}}} {x_ {2}}} = {\ frac {y} {x}} \ end {aligned}}}