(a) Find the divergence of the function
\[\mathbf{v}=\frac{1}{r}\hat{\mathbf{r}} \]First compute it directly, as in Eq. 1.84:
\[\nabla \cdot \left( \frac{1}{r^2 }\hat{\mathbf{r}} \right) =\frac{1}{r^2 }\frac{\partial }{\partial r} \left( r^2 \frac{1}{r^2 } \right) =\frac{1}{r^2 }\frac{\partial }{\partial r}(1)=0\tag{Eq. 1.84, page 43} \]Test your result using the divergence theorem (over a sphere of radius $R $, centered at the origin), as in Eq. 1.85:
\[\oint \mathbf{v}\cdot d\mathbf{a}=\int \left( \frac{1}{R^2 }\hat{\mathbf{r}} \right) \cdot (R^2 \sin \theta d\theta d\phi \hat{\mathbf{r}})\tag{Eq. 1.85, page 44} \]Is there a delta function at the origin, as there was for $\hat{\mathbf{r}}/r^2 ? $ What is the general formula for the divergence of $r^n \hat{\mathbf{r}} $?
(b) Find the curl of $r^n \hat{\mathbf{r}} $. Test your conclusion using problem 1.61b.
(a) A direct computation gives
\begin{align*} \nabla \cdot \mathbf{v} &= \nabla \cdot \left( \frac{1}{r}\hat{\mathbf{r}} \right) \\ &= \frac{1}{r^2 }\frac{\partial }{\partial r} \left( r^2 \frac{1}{r} \right) \\ &= \frac{1}{r^2 }\frac{\partial }{\partial r}(r)\\ &= \frac{1}{r^2 } \end{align*}Using the divergence theorem
\[\int \mathbf{v}\cdot d\mathbf{a}=\int \nabla \cdot \mathbf{v}d\tau \]let's first take a surface integral over a sphere of radius $R $:
\begin{align*} \oint \mathbf{v}\cdot d\mathbf{a} &= \int \left( \frac{1}{R}\hat{\mathbf{r}} \right) \cdot (R^2 \sin \theta d\theta d\phi \hat{\mathbf{r}} ) \\ &= R\int_{\phi =0}^{2\pi } \int_{\theta =0}^{\pi } \sin \left( \theta \right) d\theta d\phi \\ &= 4\pi R \end{align*}And now a volume integral of the divergence
\begin{align*} \int \nabla \cdot \mathbf{v}d\tau &= \int_{\phi =0}^{2\pi } \int_{\theta =0}^{\pi } \int_{r=0}^{R} \left( \frac{1}{r^2 } \right) \left( r^2 \sin \left( \theta \right) drd\theta d\phi \right) \\ &= 4\pi R \end{align*}In this case (contrary to $\mathbf{v}=\hat{\mathbf{r}}/r^2 $), the divergence theorem works perfectly.
In general, we have:
\begin{align*} \nabla \cdot (r^n \hat{\mathbf{r}}) &= \frac{1}{r^2 }\frac{\partial }{\partial r} \left( r^2 r^n \right) \\ &= \frac{1}{r^2 }\frac{\partial }{\partial r}(r^{n+2}) \\ &= \frac{1}{r^2 }(n+2)r^{n+1} \\ &= (n+2)r^{n+1-2} \\ &= (n+2)r^{n-1} \tag{For $n\neq -2 $} \end{align*}If $n=-2 $, then we have the delta Dirac $\nabla \cdot (\hat{\mathbf{r}}/r^2 )=4\pi \delta ^3 (\mathbf{r}) $ (see Eq. 1.99, page 48).
(b) A quick inspection at the curl formula in spherical coordinates tells us that
\[\nabla \times (r^n \hat{\mathbf{r}})=\mathbf{0} \]Using problem 1.61b, we see that the integrand on right hand side of
\[\int _{\mathcal{V}}(\nabla \times \mathbf{v})d\tau =-\oint _{\mathcal{S}}\mathbf{v}\times d\mathbf{a} \]Is a cross product of parallel vectors and thus vanishes. This means that the left hand side is also zero, as expected from the explicit computation of the curl.