I am working on a problem that asks to use the following identity to compute the Laplacian in different coordinate systems:
$\nabla^2 f = g^{ij} \nabla_i f_{,j}$
In the cylindrical coordinate system, I have the bases:
$G= \begin{bmatrix} cos\theta & -rsin\theta & 0 \\ sin\theta & rcos\theta & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}$
$G^{-1}= \begin{bmatrix} cos\theta & -sin\theta & 0 \\ \frac{sin\theta}{r} & \frac{cos\theta}{r} & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}$
So: $g^{ij}= \begin{bmatrix} 1 & 0 & 0 \\ 0 & \frac{1}{r^2} & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}$
At the end, I end up with:
$\nabla^2 f = g^{ij} \nabla_i f_{,j} = \frac{\partial^2 f}{\partial r^2}+\frac{1}{r^2}\frac{\partial^2 f}{\partial \theta^2}+\frac{\partial^2 f}{\partial z^2}$
The first term above is wrong, as it should be:
$\nabla^2 f = g^{ij} \nabla_i f_{,j} = \frac{1}{r}\frac{\partial}{\partial r}(r\frac{\partial f}{\partial r})+\frac{1}{r^2}\frac{\partial^2 f}{\partial \theta^2}+\frac{\partial^2 f}{\partial z^2}$
I'm not sure where I went wrong. I suspect it might have been my computation of $\nabla_i f_{,j}$, which is the covariant derivative of a scalar field, but the book I'm following isn't very clear on the process for doing this. Any ideas?
EDIT 1:
$f_{,j}=\frac{\partial f}{\partial u_j}$ and $\nabla_i f_{,j}$ is the covariant derivative of $f_{,j}$.
I now realise what I was doing wrong. I was taking $f_{,j}$ at a function, but it is in fact a vector. The covariant derivative of a vector is given by the book I mentioned as:
$\nabla_iv_j=v_{j,i}+\Gamma^k_{ij}v_k$
Using the definition above and carrying out the calculations leads to the needed proof.