<s>[INST] Integrate $\int_0^3 \int_0^{\sqrt{9-x^2}}\int_0^{\sqrt{81-x^2-y^2}}(1) dzdydx $ How to integrate using cylindrical coordinates the following function?
$$\int_0^3 \int_0^{\sqrt{9-x^2}}\int_0^{\sqrt{81-x^2-y^2}}(1) dzdydx $$
My problem is not with the function itself but with arranging the respective boundaries with the variables.
Is it correct $\int_0^3 \int_0^{\sqrt{9-x^2}}\int_0^{\sqrt{81-x^2-y^2}}(1) dzdydx  \Rightarrow   \int_0^3 \int_0^{\sqrt{9-r^2cos^2\theta}}\int_0^{\sqrt{81-r^2}}(1) r dzd\theta dr $
When I got to the integration I got very confused, as I mentioned, with my arrangement of the boundaries and the change in area $dzd\theta dr $ since that in the second integral $\int_0^\sqrt{9-r^2cos^2\theta}$ I repeat the variable $r$. Thanks for the help.
 [/INST] The boundary is a cylinder with a cap, that lies on the first octant. The projection on the $x$-$y$ plane is the positive part of $\frac14$ of a circle with radius $3$ (lying on the first quadrant). How do you find such area using polar coordinates?
$$A=\int_0^{3}\int_0^{\sqrt{9-x^{2}}}dxdy=\int_{0}^{\pi/2}\int_0^3rdrd\theta.$$
On the other hand, to find the upperbound of $z$, simply recall that $x^2+y^2=r^2$, so:
$$\begin{cases}
z=\sqrt{81-(x^2+y^2)}\\
x^2+y^2=r^2
\end{cases}
\implies z=\sqrt{81-r^2}$$
therefore, yielding
$$\begin{aligned}V&=\int_0^3\int_0^{\sqrt{9-x^2}}\int_0^{\sqrt{81-x^2-y^2}}dzdydx=\int_{0}^{\pi/2}\int_0^3\int_0^{\sqrt{81-r^2}}rdzdrd\theta\\&=\frac{\pi}{2}\int_0^3r\sqrt{81-r^2}drd\theta=-\frac\pi2\frac{1}{3} \left(81-r^2\right)^{3/2}\Big|_0^3=\frac{9}{2} \left(27-16 \sqrt{2}\right) \pi
\end{aligned}$$
</s>