# Verify Divergence Theorem (using Spherical Coordinates)

I'm very used to calculating the flux of a vector field in cartesian coordinates, but I'm still getting tripped up when it comes to spherical or cylindrical coordinates. I was given the vector field:

$\vec{F} = \frac{r\hat{e_r}}{(r^2+a^2)^{1/2}}$

and the spherical surface

$r = \sqrt{3}a$.

From what I understand, the vector field is essentially a form of

$\vec{F}(r, \theta, \phi) = <\frac{r}{(r^2+a^2)^{1/2}}, 0, 0>$

And from this, I would find

$\int \int_S \vec{F}\cdot \hat{n}$

Is that understanding correct? I mainly need help for the surface integrals, but anything to further my understanding is very welcome.

Thank you.

My attempt to continue the problem is by first using the unit vector, $\hat{n} = \hat{e_r}$ and taking the dot product of $\vec{F}\cdot \hat{n} = \frac{r}{(r^2+a^2)^{1/2}}$.

Using the surface element of constant radius, the surface integral becomes

$\int^{2\pi}_0 \int^{\pi}_0 \frac{r}{(r^2+a^2)^{1/2}} r^2 sin(\theta) d\theta d\phi$

Thus, for $r = \sqrt{3}a$

$\frac{a^23\sqrt{3}}{2}\int^{2\pi}_0 \int^{\pi}_0 sin(\theta) d\theta d\phi$

The result is $6\pi a^2 \sqrt{3}$? I'm not sure if this is right, because when I used the divergence theorem my answer was $4\sqrt{3}\pi a^2 + 3 \pi a^3$.

• I don't see anything wrong with your understand so far. Can you keep going and solve the surface integral? Note that the unit normal vector on a spherical surface centered at the origin is simply $\hat{n}=\hat{e}_r$. – David H Mar 24 '14 at 5:01
• Thanks David; I'll try to continue it, but how do you find the unit normal vector so easily? For instance, on the curved part of a cylinder (in cylindrical coordinates), would it simply be $\hat{n} = \hat{e_\rho}$? – A4Treok Mar 24 '14 at 5:11
• A spherical surface is a surface of constant radius. A normal vector to this surface is a vector perpendicular to it, which is clearly the direction of increasing radius. Yes, the normal vector on a cylinder would be just as you guessed. It's completely analogous to $\hat z$ being the normal vector to a surface of contant $z$, such as the $xy$-plane or any plane parallel to it. – David H Mar 24 '14 at 6:09
• Also, your result $6\sqrt{3}\pi a^2$ is correct. Your calculation using the divergence theorem is wrong. – David H Mar 24 '14 at 6:12
• Many thanks for everything David. I'll retry my solution for the divergence theorem portion and post an answer if I get it. You've been a great help. – A4Treok Mar 24 '14 at 6:14

The divergence of a vector field $\vec{F}=F_r\hat{e_r}+F_{\theta}\hat{e_{\theta}}+F_{\phi}\hat{e_{\phi}}$ in spherical coordinates is $$\nabla\cdot\vec{F}=\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2F_r\right)+\frac{1}{r\sin{\theta}}\frac{\partial}{\partial\theta}(\sin{\theta}F_{\theta})+\frac{1}{r\sin{\theta}}\frac{\partial F_{\phi}}{\partial\phi}.$$

For the vector field you were given, $\vec{F}=\frac{r\hat{e_r}}{(r^2+a^2)^{1/2}}$,

$$F_r=\frac{r}{(r^2+a^2)^{1/2}},~~F_{\theta}=F_{\phi}=0$$

$$\implies\nabla\cdot\vec{F}=\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2F_r\right)$$

Now, before you waste time computing that derivative in the last line above for the divergence, let's set up the integral we're looking to calculate. By the divergence theorem,

$$\iint_{\partial V}\vec{F}\cdot\hat{n}\,dS=\iiint_V\nabla\cdot\vec{F}dV\\ =\int_0^{2\pi}\int_0^{\pi}\int_0^{\sqrt{3}a}(\nabla\cdot\vec{F})\,r^2\sin{\theta}\,drd\theta d\phi\\ =\left(\int_0^{2\pi}d\phi\right)\left(\int_0^{\pi}\sin{\theta}d\theta\right)\int_0^{\sqrt{3}a}r^2(\nabla\cdot\vec{F})\,dr\\ =4\pi\int_0^{\sqrt{3}a}r^2(\nabla\cdot\vec{F})\,dr\\ =4\pi\int_0^{\sqrt{3}a}r^2\cdot\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2F_r\right)\,dr\\ =4\pi\int_0^{\sqrt{3}a}\frac{\partial}{\partial r}\left(r^2F_r\right)\,dr\\ =4\pi(r^2F_r)\big|_0^{\sqrt{3}a}\\ =4\pi\frac{(\sqrt{3}a)^3}{\sqrt{(\sqrt{3}a)^2+a^2}}\\ =4\pi\frac{3\sqrt{3}a^3}{2a}\\ =6\sqrt{3}\pi a^2.$$

It would make understand better and in detail. Kindly follow the link. Then you can solve your problem discussed above.