# Del operator ($\nabla$) in spherical co-ordinate system

I am teaching myself about vector fields and came across the following question:

Is the following force field $\vec{F}$ conservative, where $\vec{F}(r,\theta,\varphi)$ is defined by: $$F_{r}=2ar\sin(\theta)\sin(\varphi),\: F_{\theta}=ar\cos(\theta)\sin(\varphi),\: F_{\varphi}=ar\cos(\varphi)$$

A simple test to determine whether a force field is conservative is to see if the following is true: $$\nabla\times \vec{F}=\vec{0}$$

Where by abuse of notation we have: $$\nabla=\frac{\partial \hat{\boldsymbol{\imath}}}{\partial x}+\frac{\partial \hat{\boldsymbol{\jmath}}}{\partial y}+\frac{\partial \hat{\boldsymbol{k}}}{\partial z}$$

However, as we are using a curvilinear co-ordinate basis I'm not sure how $\nabla$ should be defined?

Further to JohnD's answer, I have tried to derive his expression for $\nabla$, however, I have not managed to come to the right answer.

Taking partial derivatives of $r$ with respect to $x,y$ and $z$ we get:

\begin{align}\frac{\partial r}{\partial x}&=\frac{x}{\sqrt{x^{2}+y^{2}+z^{2}}}=\sin(\theta)\cos(\varphi) \\ \frac{\partial r}{\partial y}&= \frac{y}{\sqrt{x^{2}+y^{2}+z^{2}}}=\sin(\theta)\sin(\varphi) \\ \frac{\partial r}{\partial z} &= \frac{z}{\sqrt{x^{2}+y^{2}+z^{2}}}=\cos(\theta)\end{align}

Our partial derivatives of $\theta$ with respect to our cartesian co-ordinates are:

\begin{align}\frac{\partial \theta}{\partial x}&= \frac{z\frac{\partial r}{\partial x}}{\sqrt{r^{2}-z^{2}}}=\frac{r\cos(\theta)\sin(\theta)\cos(\varphi)}{r\sqrt{1-\cos^{2}(\theta)}}=\cos(\theta)\cos(\varphi) \\ \frac{\partial \theta}{\partial y}&=\frac{z\frac{\partial r}{\partial y}}{\sqrt{r^{2}-z^{2}}}=\frac{r\cos(\theta)\sin(\theta)\sin(\varphi)}{r\sqrt{1-\cos^{2}(\theta)}}=\cos(\theta)\sin(\varphi) \\ \frac{\partial \theta}{\partial z} &= \frac{z\frac{\partial r}{\partial z}-r}{r\sqrt{r^{2}-z^{2}}} = \frac{r\cos^{2}(\theta)-r}{r\sqrt{r^{2}-r^{2}\cos^{2}(\theta)}}=-\frac{\sin(\theta)}{r}\end{align}

And finally partial derivatives of $\varphi$:

\begin{align}\frac{\partial \varphi}{\partial x}&=-\frac{y}{x^{2}(1+\frac{y^{2}}{x^{2}})}=-\frac{r\sin(\theta)\sin(\varphi)}{r^{2}\sin^{2}(\theta)\cos^{2}(\theta)(1+\tan^{2}(\varphi))}=-\frac{\sin(\varphi)}{r} \\ \frac{\partial \varphi}{\partial y}&=\frac{1}{x(1+\frac{y^2}{x^{2}})}=\frac{1}{r\sin(\theta)\cos(\varphi)(1+\tan^{2}(\varphi))}=\frac{\cos(\varphi)}{r\sin(\theta)} \\ \frac{\partial \varphi}{\partial z}&=0\end{align}

We therefore get:

\begin{align}\frac{\partial}{\partial x}&\mapsto \sin(\theta)\cos(\varphi)\frac{\partial}{\partial r}+\cos(\theta)\cos(\varphi)\frac{\partial}{\partial \theta} - \frac{\sin(\varphi)}{r}\frac{\partial}{\partial \varphi} \\ \frac{\partial}{\partial y} &\mapsto \sin(\theta)\sin(\varphi)\frac{\partial}{\partial r} + \cos(\theta)\sin(\varphi)\frac{\partial}{\partial \theta} + \frac{\cos(\varphi)}{r\sin(\theta)}\frac{\partial}{\partial \varphi} \\ \frac{\partial}{\partial z} &\mapsto \cos(\theta)\frac{\partial}{\partial r} - \frac{\sin(\theta)}{r}\frac{\partial}{\partial \theta}\end{align}

However summing coefficients of $\frac{\partial}{\partial r}$, $\frac{\partial}{\partial \theta}$ and $\frac{\partial}{\partial \varphi}$ doesn't give what is expected, so what have I done wrong?

-
See Del symbol in curlinear coordinate –  Shuchang Dec 25 '13 at 14:22

You've written $\nabla$ a bit confusingly. It may be clearer to write it (in Cartesian) as

$$\nabla = \hat i \frac{\partial}{\partial x} + \hat j \frac{\partial}{\partial y} + \hat k \frac{\partial}{\partial z}$$

This makes clear that the partial derivatives aren't of the basis vectors.

In general, $\nabla$ uses a basis of dual (or "cotangent") vectors. For a Cartesian basis, the dual basis vectors are identical to the ordinary basis vectors, so this property is somewhat less apparent.

The natural basis vectors associated with a spherical coordinate system are

\begin{align*} e_r &\equiv \frac{\partial}{\partial r} \vec r = \hat r \\ e_\theta &\equiv \frac{\partial}{\partial \theta} \vec r = r \hat \theta \\ e_\varphi &\equiv \frac{\partial}{\partial \varphi} \vec r = r \hat \varphi \sin \theta \end{align*}

The dual basis vectors--$e^r, e^\theta, e^\varphi$--can be directly computed using a triple product formula:

$$e^r = \frac{e_\theta \times e_\varphi}{e_r \cdot (e_\theta \times e_\varphi)}$$

...and similarly for $e^\theta, e^\varphi$ by permutation of variables, but since the coordinate system is orthogonal, all you really have to do is divide by the squared magnitude of each basis vector. Hence,

\begin{align*} e^r &= e_r \\ e^\theta &= \frac{e_\theta}{r^2} = \frac{\hat \theta}{r} \\ e^\varphi &= \frac{e_\varphi}{r^2 \sin^2 \theta} = \frac{\hat \varphi}{r \sin \theta} \end{align*}

Once the dual basis vectors are known, the expression for $\nabla$ follows:

\begin{align*} \nabla &= e^r \frac{\partial}{\partial r} + e^\theta \frac{\partial}{\partial \theta} + e^\varphi \frac{\partial}{\partial \varphi} \\ &= \hat r \frac{\partial}{\partial r} + \frac{1}{r} \hat \theta \frac{\partial}{\partial \theta} + \frac{1}{r \sin \theta} \hat \varphi \frac{\partial}{\partial \varphi}\end{align*}

-

In spherical coordinates, $x=r\sin\theta\cos\varphi$, $y=r\sin\theta\sin\varphi$, $z=r\cos\theta$. Use this change of variables in conjunction with the multivariable chain rule to express ${\partial \over \partial x}$, ${\partial \over \partial y}$, ${\partial \over \partial z}$ in terms of $r,\theta,\varphi$ to obtain $$\nabla_\text{spherical}=\left\langle {\partial\over \partial r},{1\over r}{\partial\over \partial\theta},{1\over r\sin\theta}{\partial\over \partial \varphi}\right\rangle.$$

The chart linked in the comment above is a very helpful reference.

-
Thank you for your helpful answer, I tried to perform a change of variable (as per the update in my question) however I didn't get the right answer; would you mind having a look through it? Thanks! –  Shaktal Dec 25 '13 at 17:13