Divergence in spherical coordinates On the one hand there is an explicit formula for divergence in spherical coordinates, namely:
$$ \nabla \cdot \vec{F} = \frac{1}{r^2} \partial_r (r^2 F^r) + \frac{1}{r \sin \theta} \partial_\theta (\sin \theta F^\theta) + \frac{1}{r \sin \theta} \partial_\phi F^\phi $$
On the other hand if I use another definition, I obtain:
$$ \nabla \cdot \vec{F} = \frac{1}{\sqrt{g}} \partial_\alpha (\sqrt{g} F^\alpha ) $$
In spherical coordinates: $g = r^4 \sin^2 \theta$, hence:
$$ \nabla \cdot \vec{F} = \frac{1}{r^2 \sin \theta} \partial_r (r^2 \sin \theta F^r ) + \frac{1}{r^2 \sin \theta} \partial_\theta (r^2 \sin \theta F^\theta ) + \frac{1}{r^2 \sin \theta} \partial_\phi (r^2 \sin \theta F^\phi ) \\
= \frac{1}{r^2} \partial_r (r^2 F^r) + \frac{1}{ \sin \theta} \partial_\theta (\sin \theta F^\theta) + \partial_\phi F^\phi$$
These are two different results. Where am I wrong?
 A: Let $\pmb{e}_{\mu}$ be an arbitrary basis for three-dimensional Euclidean space. The metric tensor is then $\pmb{e}_{\mu}\cdot\pmb{e}_{\nu}=g_{\mu\nu}$ and if $\pmb V$ is a vector then $\pmb F=F^{\mu}\pmb{e}_{\mu}$ where $F^{\mu}$ are the contravariant components of the vector $\pmb F$.
Let's choose the basis such that
$$
\pmb{e}_{\mu}\cdot\pmb{e}_{\nu}=g_{\mu\nu}=\begin{pmatrix}
1 & 0 & 0\\ 
0 & r^2\sin^2\theta & 0\\ 
0 & 0 & r^2
\end{pmatrix}=\begin{pmatrix}
g_{rr} & 0 & 0\\ 
0 & g_{\phi\phi} & 0\\ 
0 & 0 & g_{\theta\theta}
\end{pmatrix}
$$
with determinant $g=r^4\sin^2\theta$. This leads to the spherical coordinates system 
$$
x^{\mu}=(r,\phi \,r\sin\theta,\theta \,r)=\sqrt{g_{\mu\mu}}\hat{x}^{\mu}
$$
where $\hat{x}^{\mu}=(r,\phi,\theta)$.
So the divergence of a vector field $\pmb F=F^{\mu}\pmb{e}_{\mu}$ is
$$
\nabla\cdot\pmb F=\frac{1}{\sqrt g}\frac{\partial}{\partial x^{\mu}}\left(\sqrt{g} F^{\mu}\right)=\frac{1}{\sqrt g}\frac{\partial}{\partial \hat x^{\mu}}\left(\sqrt{g} \frac{F^{\mu}}{\sqrt{g_{\mu\mu}}}\right)
$$
that is
$$
\begin{align}
\nabla\cdot\pmb F&=\frac{1}{r^2\sin\theta}\left[\frac{\partial}{\partial r}\left(r^2\sin\theta\, F^{r}\right)+\frac{\partial}{\partial (\phi\,r\sin\theta)}\left(r^2\sin\theta\, F^{\phi}\right)+\frac{\partial}{\partial (\theta\,r)}\left(r^2\sin\theta\, F^{\theta}\right)\right]\\
&=\frac{1}{r^2\sin\theta}\left[\frac{\partial}{\partial r}\left(r^2\sin\theta\, \frac{F^{r}}{1}\right)+\frac{\partial}{\partial \phi}\left(r^2\sin\theta\, \frac{F^{\phi}}{r\sin\theta}\right)+\frac{\partial}{\partial \theta}\left(r^2\sin\theta\, \frac{F^{\theta}}{r}\right)\right]\\
&=\frac{1}{r^2}\frac{\partial \left(r^2 F^{r}\right)}{\partial r}+\frac{1}{r\sin\theta}\frac{\partial F^{\phi}}{\partial \phi}+\frac{1}{r\sin\theta}\frac{\partial \left(F^{\theta}\sin\theta \right)}{\partial \theta}
\end{align}
$$
