Example 3. Find the gradient of the scalar field given in spherical coordinates $(r, \theta, \varphi): u=r+\frac{\sin \theta}{r}-\sin \theta \cos \varphi$
Solution. Using formula (3), we will have

$$
\operatorname{grad} u=\left(1-\frac{\sin \theta}{r^{2}}\right) e_{r}+\frac{\cos \theta}{r}\left(\frac{1}{r}-\cos \varphi\right) e_{\theta}+\frac{\sin \varphi}{r} e_{\varphi}
$$

$3^{\circ}$. Rotor in orthogonal coordinates. Let

$$
a=a_{1}\left(q_{1}, q_{2}, q_{3}\right) \mathbf{e}_{1}+a_{2}\left(q_{1}, q_{2}, q_{3}\right) \mathbf{e}_{2}+a_{3}\left(q_{1}, q_{2}, q_{3}\right) \mathbf{e}_{3}
$$

Then

$$
\operatorname{rot} \mathrm{a}=\left|\begin{array}{ccc}
\frac{1}{H_{2} H_{3}} \mathbf{e}_{1} & \frac{1}{H_{1} H_{3}} \mathbf{e}_{2} & \frac{1}{H_{1} H_{2}} \mathbf{e}_{3} \\
\frac{\theta}{\partial q_{1}} & \frac{\theta}{\partial q_{2}} & \frac{\theta}{\partial q_{3}} \\
a_{1} H_{1} & a_{2} H_{2} & a_{3} H_{3}
\end{array}\right|
$$

In particular, in cylindrical coordinates ( $q_{1}=\rho, q_{2}=\varphi, q_{3}=z$ ):

$$
\mathrm{rol} a=\left|\begin{array}{ccc}
\frac{1}{\rho} \mathbf{e}_{\rho} & \mathbf{e}_{\varphi} & \frac{1}{\rho} \mathbf{e}_{z} \\
\frac{\theta}{\partial \rho} & \frac{\theta}{\partial \varphi} & \frac{\partial}{\partial z} \\
a_{1} & \rho a_{2} & a_{3}
\end{array}\right|
$$

in spherical coordinates ( $q_{1}=r_{1} q_{2}=\theta, q_{3}=\varphi$ ):

$$
\operatorname{rot} a=\left|\begin{array}{ccc}
\frac{1}{r^{2} \sin \theta} \mathbf{e}_{r} & \frac{1}{r \sin \theta} \mathbf{e}_{\theta} & \frac{1}{r} \mathbf{e}_{\varphi} \\
\frac{\partial}{\partial r} & \frac{\theta}{\partial \theta} & \frac{\theta}{\partial \varphi} \\
a_{1} & r a_{2} & r \sin \theta \cdot a_{3}
\end{array}\right|
$$