Covariant derivative of a scalar field 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}$.
 A: The formula stated above seems to have been misinterpreted. Let us forget about covariant derivatives of scalars (since they are the same as ordinary derivatives for them) and assume we are in Euclidean space. We generally write for a coordinate transformation:
$$x'_j=x'_j(x_i)~~~, ~~~dx_j'=\frac{\partial x'_j}{\partial x_i}dx_i:=G_{ji}dx_i~~~,~~~dx_j=\frac{\partial x_j}{\partial x'_i}dx'_i:=(G^{-1})_{ji}dx'_i $$.
If we take the Euclidean metric and apply the coordinate transformation we obtain:
$$ds^2=dx_idx_i=dx'_j(GG^T)^{-1}_{jk}dx'_k:=g_{jk}dx'_jdx'_k$$
So far this has been restating the obvious, but when one applies the transformation to the Laplacian operator one obtains:
$$\nabla^2f=\partial_i\partial_if=G_{ji}\partial'_j(G_{ki}\partial'_k f)=...\\=(GG^T)_{jk}\partial'_j\partial'_k f+G_{ji}(\partial'_{j}G_{ki})\partial'_k f$$
which in turn means that:
$$\nabla^2 f=g^{jk}\partial'_j\partial'_k f+G_{ji}(\partial'_{j}G_{ki})\partial'_k f\neq g^{jk}\partial'_j\partial'_k f$$
which differs from the form shown above. In other words, the Laplacian does not transform as the inverse of the invariant interval $ds^2$ unless the metric transformation is linear. 
A: 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.
