Say we have the scalar field of $f(x,y,z)$ which we express in spherical coordinates $f(r,\theta,\phi)$. We are now asked to express the gradient of the field in spherical coordinates, with the following:

$$ \nabla{f}=\frac{\partial f}{\partial r}\hat{\mathbf{r}} +\frac{1}{r}\frac{\partial f}{\partial \theta}\hat{\mathbf{\theta}}+ \frac{1}{r\sin{\theta}}\frac{\partial f}{\partial \varphi}\hat{\mathbf{\varphi}} $$

We are then asked to find

$$ |\nabla{f}| $$

I'm thinking that the magnitude component in spherical coordinates would be $r$, so $|\nabla{f}|=\frac{\partial f}{\partial r}$? So, if we have

$$ \nabla{f}=r^3\hat{\mathbf{r}}+\frac{1}{r}\sin{\theta}\hat{\mathbf{\theta}} $$


$$ |\nabla{f}|=r^3 $$

Is this right, or am I missing something?


The vectors $\hat{r}$, $\hat{\theta}$, and $\hat{\varphi}$ form an orthonormal system. Exactly what these vectors are depends on the point we based them at, but they're always orthonormal unless that point was on the $z$-axis. The length of a vector $a\hat{r}+b\hat{\theta}+c\hat{\varphi}$ is therefore $\sqrt{a^2+b^2+c^2}$.

For an example of why those tangential components matter for the magnitude of the gradient, consider $f(x,y,z)=\frac{x^2-y^2}{x^2+y^2+z^2}$. In spherical coordinates(1), that's $$f(r,\theta,\varphi) = \sin^2\theta\cos^2\varphi-\sin^2\theta\sin^2\varphi = \sin^2\theta\cos(2\varphi)$$ $$\nabla f = 0\cdot \hat{r}+\frac1r\sin(2\theta)\cos(2\varphi)\cdot\hat{\theta}+\frac{-2}{r}\sin\theta\sin(2\varphi)\cdot\hat{\varphi}$$ Sure, the radial component of that gradient is zero, but it's not a constant function. The gradient as a whole certainly isn't zero.

(1) There are two standard conventions for spherical coordinates; the physicist's convention $(r,\theta,\varphi)$ and the mathematician's convention $(\rho,\phi,\theta)$. They interchange the roles of the two angles, so you always have to watch out for the difference. In this post, I've followed the physicist's convention as used in the question.

  • $\begingroup$ so for your example the length would be $|\nabla f|=\sqrt{0^2+\left(\frac1r\sin(2\theta)\cos(2\varphi)\right)^2+\left(\frac{-2}{r}\sin\theta\sin(2\varphi)\right)^2}$? $\endgroup$ – whitelined Mar 14 '19 at 15:03
  • $\begingroup$ Yes, that would be the length. $\endgroup$ – jmerry Mar 14 '19 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.