Why $\boldsymbol\nabla\times(\boldsymbol\nabla\times\mathbf{u})\neq\boldsymbol\nabla(\boldsymbol\nabla\cdot\mathbf{u})-\nabla^2\mathbf{u}$? It is well known that for some vector field $\mathbf{u}$ the following holds:
$$ \boldsymbol\nabla\times(\boldsymbol\nabla\times\mathbf{u})=\boldsymbol\nabla(\boldsymbol\nabla\cdot\mathbf{u})-\nabla^2\mathbf{u}.$$
Let's consider the following vector field in cylindrical coordinates with the unit vectors $\hat{\mathbf{r}}, \hat{\boldsymbol\phi}, \hat{\mathbf{z}}$:
$$\mathbf{A}=0\hat{\mathbf{r}}+1\hat{\boldsymbol\phi}+0\hat{\mathbf{z}}.$$
For cylindrical coordinate frame we know that divergence, curl, and Laplacian are written as respectively:
$$\boldsymbol\nabla\cdot\mathbf{A} = \frac{1}{r}\frac{\partial(rA_r)}{\partial r} + \frac{1}{r}\frac{\partial A_\phi}{\partial \phi} + \frac{\partial A_z}{\partial z},$$
$$\boldsymbol\nabla\times\mathbf{A}=\left(\frac{1}{r}\frac{\partial A_z}{\partial\phi}-\frac{\partial A_\phi}{\partial z}\right)\hat{\mathbf{r}}+\left(\frac{\partial A_r}{\partial z}-\frac{\partial A_z}{\partial r}\right)\hat{\boldsymbol\phi}+\left(\frac{1}{r}\frac{\partial(rA_\phi)}{\partial r}-\frac{1}{r}\frac{\partial A_r}{\partial \phi}\right)\hat{\mathbf{z}},$$
$$\nabla^2 =\frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial}{\partial r}\right)+\frac{1}{r^2}\frac{\partial^2}{\partial\phi^2}+\frac{\partial^2}{\partial z^2}.$$
On the one hand, for the left side using these formulae we have:
$$\boldsymbol\nabla\times\hat{\boldsymbol{\phi}} = \frac{\hat{\mathbf{z}}}{r},$$ and
$$\boldsymbol\nabla\times\frac{\hat{\mathbf{z}}}{r}=\frac{\hat{\boldsymbol\phi}}{r^2}.$$
However, on the other hand, for the right side we shall have zeros, because all partials of $1$ are equal to zero. Where am I wrong?
 A: $\nabla^2 =\frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial}{\partial r}\right)+\frac{1}{r^2}\frac{\partial^2}{\partial\phi^2}+\frac{\partial^2}{\partial z^2}$ is supposed to be used for a scalar field only.
For the vector field, however, it is easy to check that Laplacian is given by:
$$\nabla^2 \mathbf{u}= \hat{\boldsymbol\rho}\left(\nabla^2 u_r-\frac{u_r}{r^2}-\frac{2}{r^2}\frac{\partial u_\phi}{\partial \phi}\right)+\hat{\boldsymbol\phi}\left(\nabla^2 u_\phi-\frac{u_\phi}{r^2}+\frac{2}{r^2}\frac{\partial u_r}{\partial \phi}\right)+\hat{\mathbf{z}}\nabla^2u_z.$$
For the vector field given, we have $u_r=u_z =0, u_\phi = 1$, and Laplacian will be equal to
$$\nabla^2 \hat{\boldsymbol{\phi}}=-\frac{\hat{\boldsymbol{\phi}}}{r^2}.$$
So, it means that $\boldsymbol\nabla\times(\boldsymbol\nabla\times\mathbf{u})=\frac{\hat{\boldsymbol{\phi}}}{r^2}=\boldsymbol\nabla(\boldsymbol\nabla\cdot\mathbf{u})-\nabla^2\mathbf{u}=-(-\frac{\hat{\boldsymbol{\phi}}}{r^2})$, so the identity holds.
