I'm trying to work out the gradient of a function in cylindrical coordinates. With $x=\rho\cos\phi$, $y=\rho\sin\phi$ and $z=z$, the Euclidean metric is $$g=d\rho^2+\rho^2d\phi^2+dz^2$$ And the gradient is defined as
$$g\left(\textrm{grad}\left(f\right),V\right)=df\left(V\right)$$
This seems to contradict what is on wikipedia, which says that
$$\textrm{grad}\left(f\right)=\frac{\partial f}{\partial\rho}\partial_{\rho}+\rho^{-1}\frac{\partial f}{\partial\phi}\partial_{\phi}+\frac{\partial f}{\partial z}\partial_{z}$$
It does not contradict wikipedia. Wikipedia does not use $\partial_\rho, \partial_\phi$ and $\partial_z$ as you wrote. The issue is that in some places, the basis vectors are normalized, and in other places it is not. Let $(\partial_\rho, \partial_\phi,\partial_z)$ be the coordinate vector fields associated to cylindrical coordinates, and $(e_\rho, e_\phi,e_z)$ be the corresponding unit vectors, i.e., $$e_\rho = \partial_\rho, \quad e_\phi = \frac{1}{\rho}\partial_\phi \quad\mbox{and} \quad e_z = \partial_z.$$In general, the definition $g({\rm grad}\,f,V) = {\rm d}f(V)$ implies the coordinate expression ${\rm grad}\,f = \sum_{i,j=1}^n g^{ij}(\partial_if)\partial_j$, where $g_{ij} = g(\partial_i,\partial_j)$ are the coefficients of $g$ in the coordinate system considered, and $(g^{ij})_{i,j=1}^n$ is the inverse matrix of $(g_{ij})_{i,j=1}^n$. The coordinate vectors associated to cylindrical coordinates are orthogonal, so life is easy: $$(g_{ij})_{i,j=1}^3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \rho^2 & 0 \\ 0 & 0 & 1 \end{pmatrix} \implies (g^{ij})_{i,j=1}^3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \rho^{-2} & 0 \\ 0 & 0 & 1\end{pmatrix},$$and thus $$\begin{align} {\rm grad}\,f &= \frac{\partial f}{\partial \rho} \partial_\rho + \frac{1}{\rho^2} \frac{\partial f}{\partial \phi} \partial_\phi + \frac{\partial f}{\partial z}\partial_z \\ &= \frac{\partial f}{\partial \rho} e_\rho + \frac{1}{\rho} \frac{\partial f}{\partial \phi} e_\phi+\frac{\partial f}{\partial z}e_z. \end{align}$$A similar cause of confusion arises when trying to express ${\rm grad}\,f$ in, say, spherical coordinates. Find formulas in terms of the coordinate vectors $\partial_\rho, \partial_\phi, \partial_\theta$, and in terms of the corresponding unit vector $e_\rho, e_\phi, e_\theta$. Compare the coefficients in the different formulas you see around and understand which ones assume normalization and which ones do not.