Question on a triple integral

cylindrical coordinatesmultiple integralmultivariable-calculus

I have a triple integral $\iiint_E \sqrt{16-x^2-z^2}dV$, where $E$ is the region above the $xy$-plane, outside the cylinder $x^2+z^2=4$, and inside the sphere $x^2+y^2+z^2=16$.

I rewrite the region $E$ by using cylindrical coordinates:
$$x=r\cos(\theta),\quad y=y,\quad z=r\sin(\theta).$$
Then it turns out that $E$ can be represented by
$$E=\{(r,y,\theta): 0\leq \theta\leq \pi,\quad 2\leq r\leq 4,\quad -\sqrt{16-r^2}\leq y\leq \sqrt{16-r^2}\},$$
or
$$E=\{(r,y,\theta): 0\leq \theta\leq \pi,\quad 2\leq r\leq \sqrt{16-y^2},\quad -2\sqrt{3}\leq y\leq 2\sqrt{3}\}.$$
With the first representation, I got
$$\begin{aligned}&\iiint_E \sqrt{16-x^2-z^2}dV=\int_0^{\pi}\int_2^4\int_{-\sqrt{16-r^2}}^{\sqrt{16-r^2}}r\sqrt{16-r^2}dydrd\theta\\
=&\int_0^{\pi}\int_2^42r(16-r^2)drd\theta=\pi\int_2^42r(16-r^2)dr=\left.-\frac{\pi}{2}(16-r^2)^2\right|_{r=2}^{r=4}\\
=&-\frac{\pi}{2}(0-144)=72\pi.
\end{aligned}$$

However, with the second representation, I got
$$\begin{aligned}&\iiint_E \sqrt{16-x^2-z^2}dV=\int_{-2\sqrt{3}}^{2\sqrt{3}}\int_0^{\pi}\int_2^{\sqrt{16-y^2}}r\sqrt{16-r^2}drd\theta dy\\
=&\int_{-2\sqrt{3}}^{2\sqrt{3}}\int_0^{\pi}\left.-\frac{1}{3}(16-r^2)^{3/2}\right|_{r=2}^{r=\sqrt{16-y^2}}d\theta dy=\int_{-2\sqrt{3}}^{2\sqrt{3}}\int_0^{\pi}\frac{1}{3}(12^{3/2}-y^3)d\theta dy\\
=&\frac{\pi}{3}\int_{-2\sqrt{3}}^{2\sqrt{3}}24\sqrt{3}-y^3dy=\frac{\pi}{3}\int_{-2\sqrt{3}}^{2\sqrt{3}}24\sqrt{3}dy=\frac{\pi}{3}(24\sqrt{3})(4\sqrt{3})=96\pi.
\end{aligned}$$

Two different methods, two different answers. I am confused about which one is correct, and why the other one is wrong. Any suggestions?

Best Answer

In your computations by the second method, you used (implicitely) that $(y^2)^{3/2}=y^3$, but this holds only if $y\geqslant0$.

So, instead of computing$$\int_{-2\sqrt3}^{2\sqrt3}\int_0^\pi-\frac13\left.(16-r^2)^{3/2}\right|_{r=2}^{r=\sqrt{16-y^2}}\,\mathrm d\theta\,\mathrm dy,$$compute$$2\int_0^{2\sqrt3}\int_0^\pi-\frac13\left.(16-r^2)^{3/2}\right|_{r=2}^{r=\sqrt{16-y^2}}\,\mathrm d\theta\,\mathrm dy,$$and then you will get $72\pi$.