Example 8. Find the directional derivative along the radius vector $\mathbf{r}$ for the function $u=\sin r$, where $r=|\mathbf{r}|$.
Solution. According to formula (2), the derivative of the function with respect to the direction of the radius vector $\mathbf{r}$ is

$$
\frac{\partial u}{\partial r}=\left(\operatorname{grad} \sin r, r^{0}\right)
$$

We find the gradient of this function:

$$
\begin{aligned}
\text { grad } \sin r & =\frac{\partial(\sin r)}{\partial x} \mathbf{i}+\frac{\partial(\sin r)}{\partial y} \mathbf{j}+\frac{\partial(\sin r)}{\partial z} \mathbf{k}= \\
& =\frac{\partial(\sin r)}{\partial r} \frac{\partial r}{\partial x} \mathbf{i}+\frac{\partial(\sin r)}{\partial r} \frac{\partial r}{\partial y} \mathbf{j}+\frac{\partial(\sin r)}{\partial r} \frac{\partial r}{\partial z} \mathbf{k}= \\
& =\left(\frac{\partial r}{\partial x} \mathbf{i}+\frac{\partial r}{\partial y} \mathbf{j}+\frac{\partial r}{\partial z} \mathbf{k}\right) \cos r=r^{0} \cos r
\end{aligned}
$$

Substituting (4) into (3), we get

$$
\frac{\partial u}{\partial r}=\left(\mathbf{r}^{0} \cos r, \mathbf{r}^{0}\right)=\left(\mathbf{r}^{0}, \mathbf{r}^{0}\right) \cos r=\cos r
$$