Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spherical coordinate system
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Integration and differentiation in spherical coordinates == [[File:Kugelkoord-lokb-e.svg|thumb|Unit vectors in spherical coordinates]] The following equations (Iyanaga 1977) assume that the colatitude {{mvar|θ}} is the inclination from the positive {{mvar|z}} axis, as in the ''physics convention'' discussed. The [[line element]] for an infinitesimal displacement from {{math|(''r'', ''θ'', ''φ'')}} to {{math|(''r'' + d''r'', ''θ'' + d''θ'', ''φ'' + d''φ'')}} is <math display="block"> \mathrm{d}\mathbf{r} = \mathrm{d}r\,\hat{\mathbf r} + r\,\mathrm{d}\theta \,\hat{\boldsymbol\theta } + r \sin{\theta} \, \mathrm{d}\varphi\,\mathbf{\hat{\boldsymbol\varphi}},</math> where <math display="block">\begin{align} \hat{\mathbf r} &= \sin \theta \cos \varphi \,\hat{\mathbf x} + \sin \theta \sin \varphi \,\hat{\mathbf y} + \cos \theta \,\hat{\mathbf z}, \\ \hat{\boldsymbol\theta} &= \cos \theta \cos \varphi \,\hat{\mathbf x} + \cos \theta \sin \varphi \,\hat{\mathbf y} - \sin \theta \,\hat{\mathbf z}, \\ \hat{\boldsymbol\varphi} &= - \sin \varphi \,\hat{\mathbf x} + \cos \varphi \,\hat{\mathbf y} \end{align}</math> are the local orthogonal [[unit vectors]] in the directions of increasing {{mvar|r}}, {{mvar|θ}}, and {{mvar|φ}}, respectively, and {{math|'''x̂'''}}, {{math|'''ŷ'''}}, and {{math|'''ẑ'''}} are the unit vectors in Cartesian coordinates. The linear transformation to this right-handed coordinate triplet is a [[rotation matrix]], <math display="block">R = \begin{pmatrix} \sin\theta\cos\varphi&\sin\theta\sin\varphi&\hphantom{-}\cos\theta\\ \cos\theta\cos\varphi&\cos\theta\sin\varphi&-\sin\theta\\ -\sin\varphi&\cos\varphi &\hphantom{-}0 \end{pmatrix}. </math> This gives the transformation from the Cartesian to the spherical, the other way around is given by its inverse. Note: the matrix is an [[orthogonal matrix]], that is, its inverse is simply its [[transpose]]. The Cartesian unit vectors are thus related to the spherical unit vectors by: <math display="block">\begin{bmatrix}\mathbf{\hat x} \\ \mathbf{\hat y} \\ \mathbf{\hat z} \end{bmatrix} = \begin{bmatrix} \sin\theta\cos\varphi & \cos\theta\cos\varphi & -\sin\varphi \\ \sin\theta\sin\varphi & \cos\theta\sin\varphi & \hphantom{-}\cos\varphi \\ \cos\theta & -\sin\theta & \hphantom{-}0 \end{bmatrix} \begin{bmatrix} \boldsymbol{\hat{r}} \\ \boldsymbol{\hat\theta} \\ \boldsymbol{\hat\varphi} \end{bmatrix}</math> The general form of the formula to prove the differential line element, is<ref name="q74503">{{cite web |title=Line element (dl) in spherical coordinates derivation/diagram |date=October 21, 2011 |work=[[Stack Exchange]] |url=https://math.stackexchange.com/q/74503}}</ref> <math display="block">\mathrm{d}\mathbf{r} = \sum_i \frac{\partial \mathbf{r}}{\partial x_i} \,\mathrm{d}x_i = \sum_i \left|\frac{\partial \mathbf{r}}{\partial x_i}\right| \frac{\frac{\partial \mathbf{r}}{\partial x_i}}{\left|\frac{\partial \mathbf{r}}{\partial x_i}\right|} \, \mathrm{d}x_i = \sum_i \left|\frac{\partial \mathbf{r}}{\partial x_i}\right| \,\mathrm{d}x_i \, \hat{\boldsymbol{x}}_i, </math> that is, the change in <math>\mathbf r</math> is decomposed into individual changes corresponding to changes in the individual coordinates. To apply this to the present case, one needs to calculate how <math>\mathbf r</math> changes with each of the coordinates. In the conventions used, <math display="block">\mathbf{r} = \begin{bmatrix} r \sin\theta \, \cos\varphi \\ r \sin\theta \, \sin\varphi \\ r \cos\theta \end{bmatrix}, x_1=r, x_2=\theta, x_3=\varphi.</math> Thus, <math display="block"> \frac{\partial\mathbf r}{\partial r} = \begin{bmatrix} \sin\theta \, \cos\varphi \\ \sin\theta \, \sin\varphi \\ \cos\theta \end{bmatrix}=\mathbf{\hat r}, \quad \frac{\partial\mathbf r}{\partial \theta} = \begin{bmatrix} r \cos\theta \, \cos\varphi \\ r \cos\theta \, \sin\varphi \\ -r \sin\theta \end{bmatrix}=r\,\hat{\boldsymbol\theta }, \quad \frac{\partial\mathbf r}{\partial \varphi} = \begin{bmatrix} -r \sin\theta \, \sin\varphi \\ \hphantom{-}r \sin\theta \, \cos\varphi \\ 0 \end{bmatrix} = r \sin\theta\,\mathbf{\hat{\boldsymbol\varphi}} . </math> The desired coefficients are the magnitudes of these vectors:<ref name="q74503" /> <math display="block"> \left|\frac{\partial\mathbf r}{\partial r}\right| = 1, \quad \left|\frac{\partial\mathbf r}{\partial \theta}\right| = r, \quad \left|\frac{\partial\mathbf r}{\partial \varphi}\right| = r \sin\theta. </math> The [[Surface integral|surface element]] spanning from {{mvar|θ}} to {{math|''θ'' + d''θ''}} and {{mvar|φ}} to {{math|''φ'' + d''φ''}} on a spherical surface at (constant) radius {{mvar|r}} is then <math display="block"> \mathrm{d}S_r = \left\|\frac{\partial {\mathbf r}}{\partial \theta} \times \frac{\partial {\mathbf r}}{\partial \varphi}\right\| \mathrm{d}\theta \,\mathrm{d}\varphi = \left|r {\hat \boldsymbol\theta} \times r \sin \theta {\boldsymbol\hat \varphi} \right|\mathrm{d}\theta \,\mathrm{d}\varphi= r^2 \sin\theta \,\mathrm{d}\theta \,\mathrm{d}\varphi ~. </math> Thus the differential [[solid angle]] is <math display="block">\mathrm{d}\Omega = \frac{\mathrm{d}S_r}{r^2} = \sin\theta \,\mathrm{d}\theta \,\mathrm{d}\varphi.</math> The surface element in a surface of polar angle {{mvar|θ}} constant (a cone with vertex at the origin) is <math display="block">\mathrm{d}S_\theta = r \sin\theta \,\mathrm{d}\varphi \,\mathrm{d}r.</math> The surface element in a surface of azimuth {{mvar|φ}} constant (a vertical half-plane) is <math display="block">\mathrm{d}S_\varphi = r \,\mathrm{d}r \,\mathrm{d}\theta.</math> The [[volume element]] spanning from {{mvar|r}} to {{math|''r'' + d''r''}}, {{mvar|θ}} to {{math|''θ'' + d''θ''}}, and {{mvar|φ}} to {{math|''φ'' + d''φ''}} is specified by the [[determinant]] of the [[Jacobian matrix]] of [[partial derivative]]s, <math display="block"> 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 & \hphantom{-}r\sin\theta\cos\varphi\\ \cos\theta & -r\sin\theta & \hphantom{-}0 \end{pmatrix}, </math> namely <math display="block"> \mathrm{d}V = \left|\frac{\partial(x, y, z)}{\partial(r, \theta, \varphi)}\right| \,\mathrm{d}r \,\mathrm{d}\theta \,\mathrm{d}\varphi= r^2 \sin\theta \,\mathrm{d}r \,\mathrm{d}\theta \,\mathrm{d}\varphi = r^2 \,\mathrm{d}r \,\mathrm{d}\Omega ~. </math> Thus, for example, a function {{math|''f''(''r'', ''θ'', ''φ'')}} can be integrated over every point in {{math|'''R'''<sup>3</sup>}} by the [[Multiple integral#Spherical coordinates|triple integral]] <math display="block">\int\limits_0^{2\pi} \int\limits_0^\pi \int\limits_0^\infty f(r, \theta, \varphi) r^2 \sin\theta \,\mathrm{d}r \,\mathrm{d}\theta \,\mathrm{d}\varphi ~.</math> The [[del]] operator in this system leads to the following expressions for the [[gradient]] and [[Laplacian]] for scalar fields, <math display="block">\begin{align} \nabla f &= {\partial f \over \partial r}\hat{\mathbf r} + {1 \over r}{\partial f \over \partial \theta}\hat{\boldsymbol\theta} + {1 \over r\sin\theta}{\partial f \over \partial \varphi}\hat{\boldsymbol\varphi}, \\[8pt] \nabla^2 f &= {1 \over r^2}{\partial \over \partial r} \left(r^2 {\partial f \over \partial r}\right) + {1 \over r^2 \sin\theta}{\partial \over \partial \theta} \left(\sin\theta {\partial f \over \partial \theta}\right) + {1 \over r^2 \sin^2\theta}{\partial^2 f \over \partial \varphi^2} \\[8pt] & = \left(\frac{\partial^2}{\partial r^2} + \frac{2}{r} \frac{\partial}{\partial r}\right) f + {1 \over r^2 \sin\theta}{\partial \over \partial \theta} \left(\sin\theta \frac{\partial}{\partial \theta}\right) f + \frac{1}{r^2 \sin^2\theta}\frac{\partial^2}{\partial \varphi^2}f ~, \\[8pt] \end{align}</math>And it leads to the following expressions for the [[divergence]] and [[curl (mathematics)|curl]] of [[Vector field|vector fields]], <math display="block">\nabla \cdot \mathbf{A} = \frac{1}{r^2}{\partial \over \partial r}\left( r^2 A_r \right) + \frac{1}{r \sin\theta}{\partial \over \partial\theta} \left( \sin\theta A_\theta \right) + \frac{1}{r \sin \theta} {\partial A_\varphi \over \partial \varphi},</math><math display="block">\begin{align} \nabla \times \mathbf{A} = {} & \frac{1}{r\sin\theta} \left[{\partial \over \partial \theta} \left( A_\varphi\sin\theta \right) - {\partial A_\theta \over \partial \varphi}\right] \hat{\mathbf r} \\[4pt] & {} + \frac 1 r \left[{1 \over \sin\theta}{\partial A_r \over \partial \varphi} - {\partial \over \partial r} \left( r A_\varphi \right) \right] \hat{\boldsymbol\theta} \\[4pt] & {} + \frac 1 r \left[{\partial \over \partial r} \left( r A_\theta \right) - {\partial A_r \over \partial \theta}\right] \hat{\boldsymbol\varphi}, \end{align}</math> Further, the inverse Jacobian in Cartesian coordinates is <math display="block">J^{-1} = \begin{pmatrix} \dfrac{x}{r}&\dfrac{y}{r}&\dfrac{z}{r}\\\\ \dfrac{xz}{r^2\sqrt{x^2+y^2}}&\dfrac{yz}{r^2\sqrt{x^2+y^2}}&\dfrac{-\left(x^2 + y^2\right)}{r^2\sqrt{x^2+y^2}}\\\\ \dfrac{-y}{x^2+y^2}&\dfrac{x}{x^2+y^2}&0 \end{pmatrix}.</math> The [[metric tensor]] in the spherical coordinate system is <math>g = J^T J </math>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)