# How to deduct the gradient in spherical coordinates?

1. Jul 30, 2013

### igorronaldo

2. Jul 30, 2013

### vanhees71

The one given in Wikipedia is correct, or what is your question?

3. Jul 30, 2013

### yungman

Should be this one:

$$\nabla f(r, \theta, \phi) = \frac{\partial f}{\partial r}\mathbf{e}_r+ \frac{1}{r}\frac{\partial f}{\partial \theta}\mathbf{e}_\theta+ \frac{1}{r \sin\theta}\frac{\partial f}{\partial \phi}\mathbf{e}_\phi$$

4. Jul 30, 2013

### vanhees71

That's correct. Maybe you want to know, how to derive it?

The point is to write
$$\mathrm{d} \phi=\mathrm{d} \vec{r} \cdot \vec{\nabla} \phi=\mathrm{d} r \partial_r \phi + \mathrm{d} \vartheta \partial_{\vartheta} \phi + \mathrm{d} \varphi \partial_{\varphi}\phi$$
in terms of the normalized coordinate basis $(\vec{e}_r,\vec{e}_{\vartheta},\vec{e}_{\varphi})$. The term from the variation of $r$ is
$$\mathrm{d} r \frac{\partial \vec{r}}{\partial r} \cdot \vec{\nabla} \phi=\mathrm{d} r \vec{e}_r \cdot \vec{\nabla} \phi.$$
Comparing the coefficients of $\mathrm{d} r$ gives
$$\vec{e}_r \cdot \vec{\nabla} \phi=\partial_r \phi.$$
For the $\vartheta$ component
$$\mathrm{d} \vartheta \frac{\partial \vec{r}}{\partial \vartheta} \cdot \vec{\nabla} \phi = r \vec{e}_{\vartheta} \cdot \vec{\nabla} \phi, \;\Rightarrow \; \vec{e}_{\vartheta} \cdot \vec{\nabla} \phi=\frac{1}{r} \partial_{\vartheta} \phi,$$
and for $\mathrm{d} \varphi$
$$\mathrm{d} \varphi \frac{\partial \vec{r}}{\partial \varphi} \cdot \vec{\nabla} \phi = r \sin \vartheta \vec{e}_{\vartheta} \cdot \vec{\nabla} \phi, \; \Rightarrow \; \vec{e}_{\varphi} \cdot \vec{\nabla} \phi=\frac{1}{r \sin \varphi} \partial_{\vartheta} \phi,$$

5. Jul 31, 2013

### igorronaldo

Now clear, thanks.