PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Laplacian from Rectangular to Spherical Coordinates

The Laplacian from Rectangular to Spherical Coordinates

Swapnil Sunil Jain


Date: June 4, 2006


We begin by recognizing the familiar conversion from rectangular to spherical coordinates1
    $\displaystyle x = r\sin(\theta)\cos(\phi), \qquad y = r\sin(\theta)\sin(\phi), \qquad z = r\cos(\theta),$ (1)

and conversely from spherical to rectangular coordinates
    $\displaystyle r = \sqrt{x^{2}+y^{2}+z^{2}}, \qquad \theta = \arccos\left(\frac{z}{r}\right), \qquad \phi = \arctan\left(\frac{y}{x}\right).$ (2)

Now, we know that the Laplacian in rectangular coordinates is defined in the following way2
$\displaystyle {\nabla}^2 f$ $\displaystyle =$ $\displaystyle \frac{{\partial}^2 f}{\partial x^2} + \frac{{\partial}^2 f}{\partial y^2} + \frac{{\partial}^2 f}{\partial z^2}.$ (3)

We also know that the partial derivatives in rectangular coordinates can be expanded in the following way by using the chain rule
$\displaystyle \frac{\partial f}{\partial x}$ $\displaystyle =$ $\displaystyle \frac{\partial f}{\partial r}\frac{\partial r}{\partial x}+ \frac... ...}{\partial x} + \frac{\partial f}{\partial\phi}\frac{\partial\phi}{\partial x},$ (4)
$\displaystyle \frac{\partial f}{\partial y}$ $\displaystyle =$ $\displaystyle \frac{\partial f}{\partial r}\frac{\partial r}{\partial y}+ \frac... ...}{\partial y} + \frac{\partial f}{\partial\phi}\frac{\partial\phi}{\partial y},$ (5)
$\displaystyle \frac{\partial f}{\partial z}$ $\displaystyle =$ $\displaystyle \frac{\partial f}{\partial r}\frac{\partial r}{\partial z}+ \frac... ...}{\partial z} + \frac{\partial f}{\partial\phi}\frac{\partial\phi}{\partial z}.$ (6)

The next step is to manipulate the right-hand side of each of the above three equations so that it is only a function of $ r$, $ \theta$ and $ \phi$. We can do this by substituting the following expressions in their respective places in the above three equations3
    $\displaystyle \frac{\partial r}{\partial x} = \sin(\theta)\cos(\phi), \qquad \f... ... \frac{\partial\phi}{\partial x} = -\frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)},$  
    $\displaystyle \frac{\partial r}{\partial y} = \sin(\theta)\sin(\phi), \qquad \f... ...d \frac{\partial\phi}{\partial y} = \frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)},$  
    $\displaystyle \frac{\partial r}{\partial z} = \cos(\theta), \qquad \frac{\parti... ...tial z} = -\frac{1}{r}\sin(\theta), \qquad \frac{\partial\phi}{\partial z} = 0.$ (7)

After the substitution, equation (4) looks like the following
$\displaystyle \frac{\partial f}{\partial x}$ $\displaystyle =$ $\displaystyle \sin(\theta)\cos(\phi)\frac{\partial f}{\partial r} + \frac{1}{r}... ...a} - \frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}.$ (8)

Assuming that $ f$ is a sufficiently differentiable function, we can replace $ f$ by $ \frac{\partial f}{\partial x}$ and arrive at the following
$\displaystyle \frac{{\partial}^2 f}{\partial x^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\cos(\phi)\frac{\partial}{\partial r}\Big[\frac{\part... ...n(\theta)}\frac{\partial}{\partial\phi}\Big[\frac{\partial f}{\partial x}\Big].$ (9)

Now the trick is to substitute equation (8) $ \textit{into}$ equation (9) in order to eliminate any partial derivatives with respect to $ x$. The result is the following equation
$\displaystyle \frac{{\partial}^2 f}{\partial x^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\cos(\phi)\frac{\partial}{\partial r}\Big[\sin(\theta... ...frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big] +$  
    $\displaystyle \frac{1}{r}\cos(\theta)\cos(\phi)\frac{\partial}{\partial\theta}\... ...frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big] -$  
    $\displaystyle \frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial}{\partia... ...\frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big].$  

In the hopes of simplifying the above equation, we operate the derivatives on the operands and get
$\displaystyle \frac{{\partial}^2 f}{\partial x^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\cos(\phi)\Big[\sin(\theta)\cos(\phi)\frac{{\partial}... ...c{1}{r}\cos(\theta)\cos(\phi)\frac{{\partial}^2 f}{\partial r \partial\theta} +$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)}{\sin(\theta)}\frac{\partial f}{\pa... ...cos(\theta)\cos(\phi)\Big[\cos(\theta)\cos(\phi)\frac{\partial f}{\partial r} +$  
    $\displaystyle \sin(\theta)\cos(\phi)\frac{{\partial}^2 f}{\partial r\partial\th... ...frac{\sin(\phi)\cos(\theta)}{{\sin}^2(\theta)}\frac{\partial f}{\partial\phi} -$  
    $\displaystyle \frac{1}{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\... ...tial r} + \sin(\theta)\cos(\phi)\frac{{\partial}^2 f}{\partial r\partial\phi} -$  
    $\displaystyle \frac{1}{r}\cos(\theta)\sin(\phi)\frac{\partial f}{\partial\theta... ...{r}\frac{\sin(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\partial{\phi}^2}\Big].$  

After further simplifying the above equation, we arrive at the following form
$\displaystyle \frac{{\partial}^2 f}{\partial x^2}$ $\displaystyle =$ $\displaystyle \Big[{\sin}^2(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial... ...ta)\sin(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial r \partial\theta} +$  
    $\displaystyle \frac{1}{r^2}\sin(\phi)\cos(\phi)\frac{\partial f}{\partial\phi} ... ...+ \Big[\frac{1}{r}{\cos}^2(\theta){\cos}^2(\phi)\frac{\partial f}{\partial r} +$  
    $\displaystyle \frac{1}{r}\sin(\theta)\cos(\theta){\cos}^2(\phi)\frac{{\partial}... ...}{r^2}{\cos}^2(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial{\theta}^2} +$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi){\cos}^2(\theta)}{{\sin}^2... ...rtial\phi}\Big] + \Big[\frac{1}{r}{\sin}^2(\phi)\frac{\partial f}{\partial r} -$  
    $\displaystyle \frac{1}{r}\sin(\phi)\cos(\phi)\frac{{\partial}^2 f}{\partial r\p... ...i)\sin(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\partial\theta \partial\phi} +$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi)}{{\sin}^2(\theta)}\frac{\... ...{{\sin}^2(\phi)}{{\sin}^2(\theta)}\frac{{\partial}^2 f}{\partial{\phi}^2}\Big].$  

Notice that we have derived the first term of the right-hand side of equation (3) (i.e. $ \frac{{\partial}^2 f}{\partial x^2}$) in terms of spherical coordinates. We now have to do a similar arduous derivation for the rest of the two terms (i.e. $ \frac{{\partial}^2 f}{\partial y^2}$ and $ \frac{{\partial}^2 f}{\partial z^2}$). Lets do it!

After we substitute the values of (7) into equation (5) we get

$\displaystyle \frac{\partial f}{\partial y}$ $\displaystyle =$ $\displaystyle \sin(\theta)\sin(\phi)\frac{\partial f}{\partial r} + \frac{1}{r}... ...a} + \frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}.$ (10)

We then differentiate both sides with respect to $ y$ and arrive at the following
$\displaystyle \frac{{\partial}^2 f}{\partial y^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\sin(\phi)\frac{\partial}{\partial r}\Big[\frac{\part... ...n(\theta)}\frac{\partial}{\partial\phi}\Big[\frac{\partial f}{\partial y}\Big].$ (11)

Now we substitute equation (10) into equation (11) in order to eliminate any partial derivatives with respect to $ y$. The result is the following
$\displaystyle \frac{{\partial}^2 f}{\partial y^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\sin(\phi)\frac{\partial}{\partial r}\Big[\sin(\theta... ...frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big] +$  
    $\displaystyle \frac{1}{r}\cos(\theta)\sin(\phi)\frac{\partial}{\partial\theta}\... ...frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big] +$  
    $\displaystyle \frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial}{\partia... ...\frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial f}{\partial\phi}\Big].$  

Now we operate the operators and get
$\displaystyle \frac{{\partial}^2 f}{\partial y^2}$ $\displaystyle =$ $\displaystyle \sin(\theta)\sin(\phi)\Big[\sin(\theta)\sin(\phi)\frac{{\partial}... ...ac{1}{r}\cos(\theta)\sin(\phi)\frac{{\partial}^2 f}{\partial r\partial\theta} -$  
    $\displaystyle \frac{1}{r^2}\frac{\cos(\phi)}{\sin(\theta)}\frac{\partial f}{\pa... ...n(\phi)\Big[\sin(\theta)\sin(\phi)\frac{\partial f}{\partial r\partial\theta} +$  
    $\displaystyle \cos(\theta)\sin(\phi)\frac{\partial f}{\partial r} - \frac{1}{r}... ...\frac{\cos(\phi)cos(\theta)}{{\sin}^2(\theta)}\frac{\partial f}{\partial\phi} +$  
    $\displaystyle \frac{1}{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\... ...tial r} + \sin(\theta)\sin(\phi)\frac{{\partial}^2 f}{\partial r\partial\phi} +$  
    $\displaystyle \frac{1}{r}\cos(\theta)\cos(\phi)\frac{\partial f}{\partial\theta... ...{r}\frac{\cos(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\partial{\phi}^2}\Big],$  

and after some simplifications
$\displaystyle \frac{{\partial}^2 f}{\partial y^2}$ $\displaystyle =$ $\displaystyle \Big[{\sin}^2(\theta){\sin}^2(\phi)\frac{{\partial}^2 f}{\partial... ...eta)\cos(\theta){\sin}^2(\phi)\frac{{\partial}^2 f}{\partial r\partial\theta} -$  
    $\displaystyle \frac{1}{r^2}\sin(\phi)\cos(\phi)\frac{\partial f}{\partial\phi} ... ...(\theta)\sin(\theta){\sin}^2(\phi)\frac{\partial f}{\partial r\partial\theta} +$  
    $\displaystyle \frac{1}{r}{\cos}^2(\theta){\sin}^2(\phi)\frac{\partial f}{\parti... ...}{r^2}{\cos}^2(\theta){\sin}^2(\phi)\frac{{\partial}^2 f}{\partial{\theta}^2} -$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi){\cos}^2(\theta)}{{\sin}^2... ...rtial\phi}\Big] + \Big[\frac{1}{r}{\cos}^2(\phi)\frac{\partial f}{\partial r} +$  
    $\displaystyle \frac{1}{r}\cos(\phi)\sin(\phi)\frac{{\partial}^2 f}{\partial r\p... ...hi)\sin(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\partial\theta\partial\phi} -$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi)}{{\sin}^2(\theta)}\frac{\... ...{{\cos}^2(\phi)}{{\sin}^2(\theta)}\frac{{\partial}^2 f}{\partial{\phi}^2}\Big].$  

Now its time to derive $ \frac{{\partial}^2 f}{\partial z^2}$. After our substitution of value in (7) into equation (6) we get

$\displaystyle \frac{\partial f}{\partial z}$ $\displaystyle =$ $\displaystyle \cos(\theta)\frac{\partial f}{\partial r} - \frac{1}{r}\sin(\theta)\frac{\partial f}{\partial\theta}.$ (12)

We then differentiate both sides of the above equation with respect to $ z$ resulting in the following
$\displaystyle \frac{{\partial}^2 f}{\partial z^2}$ $\displaystyle =$ $\displaystyle \cos(\theta)\frac{\partial}{\partial r}\Big[\frac{\partial f}{\pa... ...(\theta)\frac{\partial}{\partial\theta}\Big[\frac{\partial f}{\partial z}\Big].$ (13)

Now we substitute equation (12) into equation (13) in order to eliminate any partial derivatives with respect to $ z$ and we arrive at
$\displaystyle \frac{{\partial}^2 f}{\partial z^2}$ $\displaystyle =$ $\displaystyle \cos(\theta)\frac{\partial}{\partial r}\Big[\cos(\theta)\frac{\pa... ...}{\partial r} - \frac{1}{r}\sin(\theta)\frac{\partial f}{\partial\theta}\Big] -$  
    $\displaystyle \frac{1}{r}\sin(\theta)\frac{\partial}{\partial\theta}\Big[\cos(\... ...f}{\partial r} - \frac{1}{r}\sin(\theta)\frac{\partial f}{\partial\theta}\Big].$  

After operating the operators we get
$\displaystyle \frac{{\partial}^2 f}{\partial z^2}$ $\displaystyle =$ $\displaystyle \cos(\theta)\Big[\cos(\theta)\frac{{\partial}^2 f}{\partial r^2} ... ... \frac{1}{r}\sin(\theta)\frac{{\partial}^2 f}{\partial r \partial\theta}\Big] -$  
    $\displaystyle \frac{1}{r}\sin(\theta)\Big[-\sin(\theta)\frac{\partial f}{\parti... ... r \partial\theta} - \frac{1}{r}\cos(\theta)\frac{\partial f}{\partial\theta} -$  
    $\displaystyle \frac{1}{r}\sin(\theta)\frac{{\partial}^2 f}{\partial{\theta}^2}\Big],$  

and then simplifying
$\displaystyle \frac{{\partial}^2 f}{\partial z^2}$ $\displaystyle =$ $\displaystyle \Big[{\cos}^2(\theta)\frac{{\partial}^2 f}{\partial r^2} + \frac{... ...l\theta}\Big] + \Big[\frac{1}{r}{\sin}^2(\theta)\frac{\partial f}{\partial r} -$  
    $\displaystyle \frac{1}{r}\sin(\theta)\cos(\theta)\frac{{\partial}^2 f}{\partial... ... + \frac{1}{r^2}{\sin}^2(\theta)\frac{{\partial}^2 f}{\partial{\theta}^2}\Big].$  

Now that we have all three terms of the right hand side of equation (3)(i.e. $ \frac{{\partial}^2 f}{\partial x^2}$, $ \frac{{\partial}^2 f}{\partial y^2}$ and $ \frac{{\partial}^2 f}{\partial z^2}$), we add them all together (because of equation (3)) to get the laplacian in terms of $ r$, $ \theta$ and $ \phi$

$\displaystyle {\nabla}^2 f$ $\displaystyle =$ $\displaystyle \Big[{\sin}^2(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial... ...ta)\sin(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial r \partial\theta} +$  
    $\displaystyle \frac{1}{r^2}\sin(\phi)\cos(\phi)\frac{\partial f}{\partial\phi} ... ...+ \Big[\frac{1}{r}{\cos}^2(\theta){\cos}^2(\phi)\frac{\partial f}{\partial r} +$  
    $\displaystyle \frac{1}{r}\sin(\theta)\cos(\theta){\cos}^2(\phi)\frac{{\partial}... ...}{r^2}{\cos}^2(\theta){\cos}^2(\phi)\frac{{\partial}^2 f}{\partial{\theta}^2} +$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi){\cos}^2(\theta)}{{\sin}^2... ...rtial\phi}\Big] + \Big[\frac{1}{r}{\sin}^2(\phi)\frac{\partial f}{\partial r} -$  
    $\displaystyle \frac{1}{r}\sin(\phi)\cos(\phi)\frac{{\partial}^2 f}{\partial r\p... ...i)\sin(\phi)}{\sin(\theta)}\frac{{\partial}^2 f}{\partial\theta \partial\phi} +$  
    $\displaystyle \frac{1}{r^2}\frac{\sin(\phi)\cos(\phi)}{{\sin}^2(\theta)}\frac{\... ...Big] + \Big[{\sin}^2(\theta){\sin}^2(\phi)\frac{{\partial}^2 f}{\partial r^2} -$  
    $\displaystyle \frac{1}{r^2}\sin(\theta)\cos(\theta){\sin}^2(\phi)\frac{\partial... ...ial\theta} - \frac{1}{r^2}\sin(\phi)\cos(\phi)\frac{\partial f}{\partial\phi} +$  
    $\displaystyle \frac{1}{r}\sin(\phi)\cos(\phi)\frac{{\partial}^2 f}{\partial r\p... ...eta} + \frac{1}{r}{\cos}^2(\theta){\sin}^2(\phi)\frac{\partial f}{\partial r} -$  
    $\displaystyle \frac{1}{r^2}\sin(\theta)\cos(\theta){\sin}^2(\phi)\frac{\partial... ...)\cos(\phi){\cos}^2(\theta)}{{\sin}^2(\theta)}\frac{\partial f}{\partial\phi} +$  
    $\displaystyle \frac{1}{r^2}\frac{\cos(\theta)\sin(\phi)\cos(\phi)}{\sin(\theta)... ... \frac{1}{r}\cos(\phi)\sin(\phi)\frac{{\partial}^2 f}{\partial r\partial\phi} +$  
    $\displaystyle \frac{1}{r^2}\frac{\cos(\theta){\cos}^2(\phi)}{\sin(\theta)}\frac... ...}\frac{\sin(\phi)\cos(\phi)}{{\sin}^2(\theta)}\frac{\partial f}{\partial\phi} +$  
    $\displaystyle \frac{1}{r^2}\frac{{\cos}^2(\phi)}{{\sin}^2(\theta)}\frac{{\parti... ...\cos(\theta)\sin(\theta)\frac{{\partial}^2 f}{\partial r \partial\theta}\Big] +$  
    $\displaystyle \Big[\frac{1}{r}{\sin}^2(\theta)\frac{\partial f}{\partial r} - \... ... + \frac{1}{r^2}{\sin}^2(\theta)\frac{{\partial}^2 f}{\partial{\theta}^2}\Big].$  

It may be hard to believe but the truth is that the above expression, after some miraculous simplifications of course, reduces to the following succinct expression and we finally arrive at the Laplacian in spherical coordinates!

$\displaystyle {\nabla}^2 f$ $\displaystyle =$ $\displaystyle \frac{{\partial}^2 f}{\partial r^2} + \frac{1}{r^2}\frac{{\partia... ...frac{1}{r^2}\frac{\cos(\theta)}{\sin(\theta)}\frac{\partial f}{\partial\theta}.$ (14)

By further manipulating the above expression, we can write the Laplacian in a more compact form as

$\displaystyle {\nabla}^2 f$ $\displaystyle =$ $\displaystyle \frac{1}{r^2}\frac{\partial}{\partial r}\Big[ r^2\frac{\partial f... ...a}\Big] + \frac{1}{r^2{\sin}^2(\theta)}\frac{{\partial}^2 f}{\partial{\phi}^2}.$ (15)



Footnotes

... coordinates1
Note that convention in use here: $ \phi$ is the azimuthal angle, whereas $ \theta$ is the polar angle.
... way2
Readers should note that we do not have to define the Laplacian this way. A more rigorous approach would be define the Laplacian using a coordinate-free expression.
... equations3
These expression can be derived simply by taking the proper derivative of the expressions in (2) and then substituting the expressions from (1) in order to eliminate any dependence on $ x$, $ y$, and $ z$.




View style:

The owner of this object is swapnizzle. See also the author list (1) .

This is version 40 of "Laplacian from Rectangular to Spherical Coordinates".
Created on 2006-06-04 18:12:34 , last modified on 2009-08-03 00:33:54 .
Accessed 14626 times total.

Discussion
Style: Expand: Order:
forum policy
Differentiating by mtxcoll on 2007-03-11 17:31:19
For equation (9), why is everything except df/dr, df/d(theta), and df/d(phi) held constant when you differentiate wrt x? Shouldn't the product rule be used?
[ reply | up ]

Interact
post