Gauss formula to calculate integral Using Gauss formula calculate:$\int_S x^3dydz+y^3dxdz+z^2dxdy$ where $S$ is down part of $z=x^2+y^2$ cut out with plane $z=2x$. Using divergence theorem it comes to find:$\iiint_D (3x^2+3y^2+2z)dxdydz$, where $D$ is area bounded with(after cylindrical coordinates) $-\frac{\pi}{2}\le \phi\le \frac{\pi}{2}, 0\le r\le 2\cos\phi, 2r\cos\phi\le z\le r^2$. What is left is to plug in formula. Correct?
 A: I will go ahead and show all three and how we choose right orientation for different integrals so they are in sync with each another. Hope this helps for future questions too. I think you already did the first two integrals.
a) By applying divergence theorem which you already did,
Divergence = $3(x^2+y^2)+2z = 3r^2 + 2z$ in cylindrical coordinates,
$\displaystyle \int_{-\pi/2}^{\pi/2} \int_0^{2\cos\theta} \int_{r^2}^{2r\cos\theta} (3r^2 + 2z) \ r \ dz \ dr \ d\theta = \frac{11\pi}{3}$
This is flux for positively oriented surface (outward normal vector).
b) Flux through paraboloid surface (surface integral, without applying divergence theorem), which again you mentioned you knew how to find.
Surface is $z - x^2 - y^2 = 0$, taking derivative, normal vector $(2x, 2y, -1)$ or $(-2x, -2y, 1)$. The question does not state but since here we assume outward normal vector as in (a), that would be pointing generally downward for paraboloid surface $z = x^2+y^2$. Hence we choose $(2x, 2y, -1)$ - note the sign of $z$ component.
$\vec{F} = (x^3,y^3,z^2),$ so $\vec{F} \cdot \vec{n} = 2(x^4+y^2) - (x^2+y^2)^2$ (as on the paraboloid surface $z = x^2 + y^2$)
Simplifying, $\vec{F} \cdot \vec{n} = (x^2-y^2)^2$. Now the projection of paraboloid surface in $XY$ plane is the intersection of the plane and the paraboloid which is $x^2+y^2 = 2x$. In cylindrical coordinates the surface integral becomes,
$\displaystyle \int_{-\pi/2}^{\pi/2} \int_0^{2\cos\theta} r^4 \cos^2(2\theta) r dr d\theta = \frac{13\pi}{6}$.
c) Flux through the planar surface on top
Plane is $z = 2x$ and hence normal vector is $(2,0,-1)$ or $(-2, 0, 1)$. As we are finding flux for outward normal, in this case, the normal vector will be pointing upward in positive $z$ direction. So we choose $(-2, 0, 1)$.
Again $\vec{F} \cdot \vec{n} = (x^3,y^3,z^2) \cdot (-2, 0, 1) = 4x^2 - 2x^3$ (as on the plane, $z = 2x$). In cylindrical coordinates, the integral becomes,
$\displaystyle \int_{-\pi/2}^{\pi/2} \int_{0}^{2\cos\theta} (4r^2 \cos^2\theta - 2r^3 \cos^3 \theta) \ r \ dr \ d\theta = \frac{3\pi}{2}$
Now for this question, if you are not mandated to use Divergence theorem, you can go with $(b)$ as it is more straightforward. But if you are asked to use Divergence theorem, you find $(a)$ and $(c)$ and then $(b) = (a) - (c)$.
