# Integration using the divergence theorem.

Let $R=\left \{ \left ( x,y,z \right )\mid x^2+y^2+2z\leq 2, x\geq 0, y\geq 0,z\geq 0 \right \}$ and $\textbf{G}\left ( x,y,z \right )=xyz\left ( 1+\sin ((x^2+y^2+2z)\pi) \right )\left ( x,y,z \right )$ be a vector field.

I want to calculate $\int \int \int _\textbf{R}$div$\textbf{G}dV$. Since it is hard to calculate directly, I used the divergence theorem. So I have $\int \int \int _\textbf{R}$div$\textbf{G}dV=\int \int _{\partial R}\textbf{G}\cdot d\textbf{S}$.

There are four parts of ${\partial R}$ : $X_1(r,\theta)=(\sqrt2r\cos \theta, \sqrt2r\sin \theta, 1-r^2 ), 0\leq r\leq \sqrt2, 0\leq \theta\leq \frac\pi2$ and $X_2$, ...and so on.

For the first part, since $X_{1r}\times X_{1\theta}=\left ( 2\sqrt2r^2\cos \theta, 2\sqrt2r^2\sin \theta, 2r \right )$ I have $\int \int _{X_1}\textbf{G}\cdot d\textbf{S}=\int_{0}^{\frac\pi2}\int_{0}^{\sqrt2}2r^2\cos \theta \sin \theta(1-r^2)(1+\sin 2\pi)\left ( \sqrt2r\cos \theta, \sqrt2r\sin \theta, 1-r^2 \right )\cdot \left ( 2\sqrt2r^2\cos \theta, 2\sqrt2r^2\sin \theta, 2r \right ) drd\theta$.

It is not hard to calculate but too timekilling. Is there a easier way to calculate?

Your surface $X_1$ is the part of the paraboloid $z = 1 - \frac{1}{2}(x^2+y^2)$ in the first octant. In general, the flux of a vector field $F = Pi + Qj + Rk$ over a surface $S$ which is the graph of $z = f(x,y)$ (where $(x,y)$ range over $D$) is given by $$\iint_S F \cdot d\textbf{S} = \iint_D (-P\frac{\partial f}{\partial x} - Q\frac{\partial f}{\partial y} + R) \, dA$$
This leads to $\iint_{X_1} G \cdot d\textbf{S} = \iint_D xyz(1-x^2-y^2) \, dA = \iint_D xy(1-\frac{1}{2}(x^2+y^2))(1-x^2-y^2) \, dA$, where $D$ is the part of the disk of radius $\sqrt{2}$ (centered at the origin) in the $xy$-plane in the first quadrant. This is very easy to compute in polar coordinates. Also, each of the other parts of the surface lies in a coordinate plane, so $G$ vanishes on them, hence the only nonzero contribution to flux is from $X_1$.