Does laplacian, curl and gradient commute in spherical coordinate? I just cannot get my head around this seeming contraction:
First, we expect gradient, curl and lapalcian etc. to commute in $R^n$ as $R^n$ is flat space, even when we use spherical coordinate.
However, by inspecting the formula for laplacian and gradient etc. in spherical corrdiantes, it seems that they do not commute. For example, take a function $f(r)$ which only depends on $r$, then
\begin{align}
\Delta \nabla f &= \frac{1}{r^2}\partial_r r^2 \partial_r \partial_r f \boldsymbol{e}_r\\
&=\frac{1}{r^2} (r^2 \partial_r^3 + 2r \partial_r^2) f \boldsymbol{e}_r
\end{align}
while
\begin{align}
 \nabla \Delta f &= \partial_r (\frac{1}{r^2}  \partial_r r^2 \partial_r  f )\boldsymbol{e}_r\\
&=\partial_r (\partial_r^2 + \frac{2}{r}\partial_r) f \boldsymbol{e}_r \\
&= (f\partial_r^3 +\frac{2}{r}\partial_r^2-\frac{2}{r^2}\partial_r)f \boldsymbol{e}_r
\end{align}
and the two differ by a term of $-\frac{2}{r^2}\partial_r$! Similar things happen to laplacian and curl.
Any suggests or comments? Thanks!
 A: The gradient of a radial scalar function $f=f(r)$ in spherical coordinates is
$$ \nabla f(r,\theta)= f'(r)\hat {\mathbf r}(\theta)$$
Note that this is a vector. The vector Laplacian, in general is a slight mouthful- from trusty wikipedia if $\mathbf  F = A_r \hat{\mathbf r} + A_\theta  \hat{\boldsymbol \theta} + A_\varphi  \hat{\boldsymbol \varphi}  $,
$$\Delta \mathbf F = \left(\Delta A_{r}-\frac{2 A_{r}}{r^{2}}-\frac{2}{r^{2} \sin \theta} \frac{\partial\left(A_{\theta} \sin \theta\right)}{\partial \theta}-\frac{2}{r^{2} \sin \theta} \frac{\partial A_{\varphi}}{\partial \varphi}\right) \hat{\mathbf{r}}
\\+\left(\Delta A_{\theta}-\frac{A_{\theta}}{r^{2} \sin ^{2} \theta}+\frac{2}{r^{2}} \frac{\partial A_{r}}{\partial \theta}-\frac{2 \cos \theta}{r^{2} \sin ^{2} \theta} \frac{\partial A_{\varphi}}{\partial \varphi}\right) \hat{\boldsymbol{\theta}}\\+\left(\Delta A_{\varphi}-\frac{A_{\varphi}}{r^{2} \sin ^{2} \theta}+\frac{2}{r^{2} \sin \theta} \frac{\partial A_{r}}{\partial \varphi}+\frac{2 \cos \theta}{r^{2} \sin ^{2} \theta} \frac{\partial A_{\theta}}{\partial \varphi}\right) \hat{\boldsymbol{\varphi}}$$
In our case $A_\theta = A_\varphi = 0$, and $A_r$ is a function of $r$, leading to the simplification
$$ \Delta \nabla f = \left(\Delta f'(r)-\frac{2 f'(r)}{r^{2}}\right) \hat{\mathbf{r}}(\theta) = \left( f'''(r)+\frac{2 f''(r)}r -\frac{2 f'(r)}{r^{2}}\right) \hat{\mathbf{r}}(\theta)
$$
where we used the scalar Laplacian $\Delta g(r)=\frac1{r^2}(r^2 g'(r))' = g''(r) + \frac{2}{r}g'(r)$.
Lets start from the other side: the scalar Laplacian of $f=f(r)$ is as before, the radial scalar function
$$ \Delta f(r)=\frac1{r^2}(r^2 f'(r))' = f''(r) + \frac{2}{r}f'(r)$$
And now take the gradient:
$$ \nabla \Delta f (r)=\left(f'''(r)+\left(\frac2r f'(r)\right)' \right)\hat {\mathbf r}(\theta)$$
Upon expanding $\left(\frac2r f'(r)\right)'=\frac2rf''(r) - \frac{2}{r^2} f'(r)$, we again obtain the same result. Maths is consistent for another day...!
