I have this formula for the divergence of a vector field: $$\nabla_m V^m = \frac{1}{\sqrt{|g|}} \frac{\partial (V^m\sqrt{|g|})}{\partial x^m}$$ The metric tensor in spherical coordinates: $$ g=\begin{pmatrix} 1 & 0 & 0\\ 0 & r^2\sin^2(\theta) & 0\\ 0 & 0 & r^2 \end{pmatrix} $$ $$\sqrt{|g|}=r^2\sin(\theta)$$ So the divergence in spherical coordinates should be: $$\nabla_m V^m =\frac{1}{r^2\sin(\theta)}\frac{\partial}{\partial r}(r^2\sin(\theta)V^r)+\frac{1}{r^2\sin(\theta)}\frac{\partial}{\partial \phi}(r^2\sin(\theta)V^\phi)+\frac{1}{r^2\sin(\theta)}\frac{\partial}{\partial \theta}(r^2\sin(\theta)V^\theta)$$ Some things simplify: $$\nabla_m V^m =\frac{1}{r^2}\frac{\partial}{\partial r}(r^2V^r)+\frac{\partial V^\phi}{\partial \phi}+\frac{1}{\sin(\theta)}\frac{\partial}{\partial \theta}(\sin(\theta)V^\theta)$$
What am I doing wrong??