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$.
 A: 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.$$
A: It would make understand better and in detail.
Kindly follow the link. Then you can solve your problem discussed above. 
