# What is wrong with this second method?

Find the outward flux of $\ \textbf{F}=16xz\ \textbf{i}-2xy\ \textbf{j}-8z^2\ \textbf{k}$ across the boundary of the region D: the wedge cut from the first octant by the plane $z+y=4$ and the elliptical cylinder $4x^2+y^2=16$.

Both of the methods involve the Divergence Theorem, however, the first method uses Cartesian coordinates to setup and evaluate the integral, while the second, uses cylindrical coordinates.

Method 1:

$$\text{Flux}=\displaystyle{\iiint_S \nabla\cdot \vec{F} \,dV}=\int_0^2\int_0^{\sqrt{16-4x^2}}\int_0^{4-y}(-2x)\ dz \ dy \ dx=-\frac{80}3$$ Method 2: Paramatrize the ellipse as $x=2r\cos(\theta), y=4r\sin(\theta)$ and $r\in[0,1], \theta\in[0,\pi/2].$ $$\text{Flux}=\int_0^{\pi/2}\int_0^{1}\int_0^{4-4r\sin(\theta)}(-4r\cos(\theta))r\ dz \ dr \ d\theta=-\frac{10}3$$

Since, $Method$ $1$ gives me the correct answer, I am guessing there is something wrong in my parametrization for the second method. However, I can't seem to find what is wrong

The Jacobian for your change of variables is not "$r$". Also, you switched from a left-handed to a right-handed coordinate system.
Why the extra minus sign? Because you reversed your coordinate system. In particular, as $x$ goes from $0$ to $2$, $\theta$ goes from $\pi/2$ to $0$, but you have the $\theta$ integral flipped, so you have reversed the sense of one of your basis elements, reversing the handedness of the coordinate system.
To fix: Use the correct Jacobian for the change of variables and include the minus sign for reversing the direction in $\theta$.