Considering a fluid whose velocity field is
$\vec{v}(x,y,z)= (y^{3}e^{-z^{2}} + x)\vec{i} + (ze^{x} + y^{2})\vec{j} + (cos(x^{2}+ y^{2}) +2z)\vec{k}$
Calculate the flow of fluid through the closed surface S comprises the border of the area bounded by the half-spheres $z = -\sqrt{4-x^{2}-y^{2}}$ and $z = \sqrt{9-x^{2}-y^{2}}$ and by the plan $z = 0$.
For the moment, I calculated the divergence of $\vec{v}$ to apply the divergence theorem in the volume of the cap between the half-spheres using cylindrical coordinates and I found a answer. But I'm not sure if I need to do something special in reason of the minus sign in the first half-sphere.
I'm afraid of doing something really wrong because I don't understand the divergence theorem really well. So any tip will be helpful.
Thanks in advance
The Volume of Integration is created by the overlapping of two semi-spheres centered at the origin ($S_1$ being the upper sphere, and $S_2$ being the lower one).
$\nabla\cdot\vec{u}=1+2y+2=3+2y$
$\begin{eqnarray} \displaystyle\iint\limits_{\partial S_1\mathop\cup\partial S_2}\vec{v}\cdot\vec{n}\,\mathrm dS&=&\iiint\limits_{S_1\mathop\cup S_2}\nabla\cdot\vec{v}\,\mathrm dV\\ &=&\iiint\limits_{S_1}\nabla\cdot\vec{v}\,\mathrm dV+\iiint\limits_{S_2}\nabla\cdot\vec{v}\,\mathrm dV \end{eqnarray}$
SPOILER!