2.26. Let $f(r)$ be an arbitrary differentiable function ( $\left.f(r) \in C^{1}(R)\right)$. Determine when

a) $\operatorname{div}(\operatorname{grad} f(r))=0\left(r=\sqrt{x^{2}+y^{2}+z^{2}}\right)$;

b) $\operatorname{div}(f(r) \cdot \dot{r})=0$.
Solution.

a) For solving this problem, it is convenient to use spherical coordinates and formulas expressing the gradient and divergence in these coordinates (see $2.79, 2.83$):

$$
\operatorname{grad} f(r)=\frac{\partial f}{\partial r} \dot{e}_{r}
$$

(only one component in the direction of the radius vector),

$$
\operatorname{divgrad} f(r)=\frac{1}{r^{2}} \frac{\partial}{\partial r}\left(r^{2} \cdot \frac{\partial f}{\partial r}\right)
$$

If the last expression equals zero, then

$$
r^{2} \cdot \frac{\partial f}{\partial r}=C=\text { const. }
$$

From this, we obtain

$$
f(r)=-\frac{C}{r}
$$

b) Let's calculate the divergence of the field $f(r) \cdot \vec{r}:$

$$
\begin{aligned}
& \operatorname{div}(f(r) \cdot \ddot{r})=\frac{\partial(f(r) \cdot x)}{\partial x}+\frac{\partial(f(r) \cdot y)}{\partial y}+\frac{\partial(f(r) \cdot z)}{\partial z}= \\
& \quad=3 f(r)+\frac{f^{\prime}(r)}{r}\left(x^{2}+y^{2}+z^{2}\right)=3 f(r)+r f^{\prime}(r)
\end{aligned}
$$

Determine for which functions $f(r)$ this divergence is zero. It is not difficult to verify that for

$$
f(r)=\frac{C}{r^{3}}(C=\text { const })
$$

we get a zero value:

$$
3 f(r)+r f^{\prime}(r)=\frac{3 C}{r^{3}}+r\left(\frac{C}{r^{3}}\right)^{\prime}=0
$$

In the next chapter, dedicated to differential equations, it will be shown that no other functions possess this property. Therefore,

$$
\operatorname{div}\left(\frac{C \cdot \ddot{r}}{r^{3}}\right)=0
$$