# Calculate divergence of vector in curvilinear coordinates using the metric

In a curved $(3+1)$ dimensional spacetime with metric components $g_{\mu \nu}$, the covariant derivative of a $4$ vector $\mathbf V = (V^0, \vec V)$ is given by $$\nabla_\mu~ V^\mu = \frac{1}{\sqrt{-g}}\partial_\mu (\sqrt{-g}~V^\mu).$$

I expect that this relation can also be used to derive the expression for divergence of the $3$ vector $\vec V$ in a flat spatial hypersurface in a curvilinear coordinate system, eg. the cylindrical polar coordinates $(r,\phi,z)$. We will then need to replace the $\sqrt{-g}~$ by $\sqrt g~$ as the metric of the spatial hypersurface has a positive determinant. This will then give $$\vec \nabla \cdot \vec V = \nabla_i V^i = \frac{1}{r}\partial_r(r~V^r) + \partial_\phi V^\phi + \partial_zV^z.$$

However, the actual expression for the divergence of a $3$ vector in cylindrical polar coordinates is $$\vec \nabla \cdot \vec V = \frac{1}{r}\partial_r(r~V^r) + \frac{1}{r}\partial_\phi V^\phi + \partial_zV^z.$$ Can you please point out and explain where I am going wrong?

Both identities are correct. The point is that they refer to different bases. The former uses the decomposition, $$\vec{V} = V^r \partial_r + V^\theta \partial_\theta + V^z \partial_z\:,$$ the latter uses the decomposition, $$\vec{V} = V'^r \vec{e}_r + V'^\theta \vec{e}_\theta + V'^z \vec{e}_z\:,$$ where $\vec{e}_i = \frac{1}{\sqrt{g_{ii}}} \partial_{x^i}$ are unit vectors, so that $V'^i = \sqrt{g_{ii}} V^i$ (there is no sum over the repeated index $i$).
• Thank you for clarifying this. So, in the first case, $\partial_{x_i}$ are the coordinate basis vectors. But I do not realise how one shall know that the unit vectors in the second basis will be given by $\vec e_i = \frac{1}{\sqrt{g_{ii}}} \partial_{x_i}$. – damaihati Apr 29 '14 at 10:31
• One has $g\left(\frac{1}{\sqrt{g_{ii}}}\partial_i, \frac{1}{\sqrt{g_{ii}}}\partial_i\right)= \frac{1}{g_{ii}}g(\partial_i,\partial_i)= \frac{1}{g_{ii}} g_{ii}=1$. Therefore $\frac{1}{\sqrt{g_{ii}}}\partial_i$ is a unit vector, tangent to the coordinate $x^i$. Consequently, if $i=r$ it coincides with $\hat{r}= \vec{e}_r$, if $i=\theta$ it coincides with $\hat{\theta}= \vec{e}_\theta$, if $i=z$ it coincides with $\hat{\theta}= \vec{e}_z$. – Valter Moretti Apr 29 '14 at 11:06
• Sorry, I used spherical coordinates but your referred to cylindrical ones, in my answer $\phi$ should be replaced for $z$. I corrected it. – Valter Moretti Apr 29 '14 at 11:11