Laplacian derivation cylindrical coordinates I want to derive the laplacian for cylindrical polar coordinates, directly, not using the explicit formula for the laplacian for curvilinear coordinates.
Now, the laplacian is defined as $\Delta = \nabla \cdot (\nabla u)$
In cylindrical coordinates, the gradient function, $\nabla$ is defined as: $$\frac{\partial }{\partial r}\boldsymbol{e_r} + \frac{1}{r}\frac{\partial }{\partial \phi}\boldsymbol{e_{\phi}} + \frac{\partial}{\partial Z}\boldsymbol{e_Z}$$
So the laplacian would be $$(\frac{\partial }{\partial r}\boldsymbol{e_r} + \frac{1}{r}\frac{\partial }{\partial \phi}\boldsymbol{e_{\phi}} + \frac{\partial}{\partial Z}\boldsymbol{e_Z})\cdot(\frac{\partial u }{\partial r}\boldsymbol{e_r} + \frac{1}{r}\frac{\partial u }{\partial \phi}\boldsymbol{e_{\phi}} + \frac{\partial u}{\partial Z}\boldsymbol{e_Z})$$
Now, due to orthogonality, the only terms that would remain are $(\frac{\partial }{\partial r}\boldsymbol{e_r})\cdot (\frac{\partial u }{\partial r}\boldsymbol{e_r}), (\frac{1}{r}\frac{\partial }{\partial \phi}\boldsymbol{e_{\phi}})\cdot (\frac{1}{r}\frac{\partial u }{\partial \phi}\boldsymbol{e_{\phi}}), (\frac{\partial}{\partial Z}\boldsymbol{e_Z})\cdot(\frac{\partial u}{\partial Z}\boldsymbol{e_Z}).$
I know we have to use the product rule here as the basis vectors are not constant with respect to eachother.
So by the product rule, the first term becomes $\frac{\partial^2 u}{\partial r^2}$ and the third term becomes $\frac{\partial^2 u}{\partial Z^2}$, but I seem to be going wrong on the second term.
Now, I thought the second term would be evaluated like this; $(\frac{1}{r^2}\boldsymbol{e_{\phi}})\cdot(\frac{\partial^2 u}{\partial \phi^2}\boldsymbol{e_{\phi}} + \frac{\partial \boldsymbol{e_{\phi}}}{\partial \phi}\frac{\partial u}{\partial \phi})$, which i thought would be equal to $\frac{1}{r^2}(\frac{\partial^2 u}{\partial \phi^2})$ as $\frac{\partial \boldsymbol{e_{\phi}}}{\partial \phi} = -\boldsymbol{-e_r}$ so by orthogonality the term should be zero.
But I get the wrong expression, so where is my mistake?
 A: The differentiation operations must be applied before the scalar products, and not the inverse way. With the present notations, the "gradient operator" in cylindrical coordinates writes
\begin{equation}
  \nabla = \boldsymbol{e}_r \frac{\partial}{\partial r} + \boldsymbol{e}_\phi \frac{1}{r} \frac{\partial}{\partial \phi} + \boldsymbol{e}_z\frac{\partial}{\partial z} \, ,
\end{equation}
where
\begin{equation}
\boldsymbol{e}_r = \cos\phi\, \boldsymbol{e}_x + \sin\phi\, \boldsymbol{e}_y \, ,\\
\boldsymbol{e}_\phi = \cos\phi\, \boldsymbol{e}_y - \sin\phi\, \boldsymbol{e}_x \, ,
\end{equation}
and $(\boldsymbol{e}_x, \boldsymbol{e}_y, \boldsymbol{e}_z)$ is an orthonormal basis of a Cartesian coordinate system such that $\boldsymbol{e}_z = \boldsymbol{e}_x\times \boldsymbol{e}_y$. Some basis vectors depend on the coordinates, according to the rule
\begin{equation}
\frac{\partial \boldsymbol{e}_r}{\partial \phi} = \boldsymbol{e}_\phi \qquad\text{and}\qquad \frac{\partial \boldsymbol{e}_\phi}{\partial \phi} = -\boldsymbol{e}_r \, .
\end{equation}
When expanding $\nabla\cdot (\nabla u)$ and using the product rule of differentiation,
\begin{aligned}
&\nabla\cdot (\nabla u) = \left(\boldsymbol{e}_r \frac{\partial}{\partial r} + \boldsymbol{e}_\phi \frac{1}{r} \frac{\partial}{\partial \phi} + \boldsymbol{e}_z\frac{\partial}{\partial z}\right) \cdot \left(\frac{\partial u}{\partial r} \boldsymbol{e}_r + \frac{1}{r} \frac{\partial u}{\partial \phi} \boldsymbol{e}_\phi + \frac{\partial u}{\partial z} \boldsymbol{e}_z\right)\\
&\phantom{\nabla\cdot (\nabla u)} = \boldsymbol{e}_r \cdot \frac{\partial}{\partial r} \left(\frac{\partial u}{\partial r} \boldsymbol{e}_r + \frac{1}{r} \frac{\partial u}{\partial \phi} \boldsymbol{e}_\phi + \frac{\partial u}{\partial z} \boldsymbol{e}_z\right) \\
&\phantom{\nabla\cdot (\nabla u) =}+ \boldsymbol{e}_\phi \cdot \frac{1}{r} \frac{\partial}{\partial \phi} \left(\frac{\partial u}{\partial r} \boldsymbol{e}_r + \frac{1}{r} \frac{\partial u}{\partial \phi} \boldsymbol{e}_\phi + \frac{\partial u}{\partial z} \boldsymbol{e}_z\right)\\
&\phantom{\nabla\cdot (\nabla u) =}+ \boldsymbol{e}_z \cdot \frac{\partial}{\partial z} \left(\frac{\partial u}{\partial r} \boldsymbol{e}_r + \frac{1}{r} \frac{\partial u}{\partial \phi} \boldsymbol{e}_\phi + \frac{\partial u}{\partial z} \boldsymbol{e}_z\right) \\
&\phantom{\nabla\cdot (\nabla u)} = \frac{1}{r}\frac{\partial}{\partial r}\left(r \frac{\partial u}{\partial r}\right) + \frac{1}{r^2}\frac{\partial^2 u}{\partial \phi^2} + \frac{\partial^2 u}{\partial z^2} \, ,
\end{aligned}
the correct Laplacian is obtained.
