Find volume inside the cone $ z= 2a-\sqrt{x^2+y^2} $ and inside the cylinder $x^2+y^2=2ay$ I have this question and I have seen here that there are similar questions but I have been trying to figure it out for a while with no luck.
I have to find volume inside the cone $z= 2a-\sqrt{x^2+y^2}$ and inside the cylinder $x^2+y^2=2ay$. 
I am trying to use cylindrical coordinates: $x=r\cos\theta\,\,\, y=r\sin\theta\,,\, z=z$.
I think I am mainly having trouble finding the boundaries for the integration $\iiint rdrdzd\theta$:
$0\leq \theta\leq 2\pi$, $0\leq z \leq 2a$, and for $r$. I think this is where I am wrong... I have $0 \leq r \leq z\,\sin(\theta)/(1-\sin(\theta)).$
If anyone knows or can give me some help I would appreciate it.
 A: The cross-sectional area of this volume is the intersection between the circular cross-sections of the cone and cylinder.  If we call that cross-sectional area $A(z)$, then the volume is 
$$V = \int_0^{2 a} dz \: A(z)$$
So the trick is to find $A(z)$.  There's no substitute in drawing a picture:

In red is the cylinder cross-section, and in blue are cone cross-sections at various values of $z$.  The integration limits will depend on $z$: when the cone cross-section intersects the cylinder cross-section below the center of the cylinder cross-section, then the intersection is bounded by the upper arc of the cone and the lower arc of the cylinder.  When the cone CS intersects the cylinder CS above the center of the cylinder CS, however, there is also additional area to the left and right of the intersection points.
The intersection points are easy enough to find; they are, in polars:
$$\sin{\theta} = 1-\frac{z}{2 a}$$
The cross sectional area at $z$ is the sum of two contributions: one ($A_1$) bounded by the red circle, the other ($A_2$) by the blue circle.
$$A_1 = \int_{ \arcsin{(1-z/(2 a))}}^{\pi - \arcsin{(1-z/(2 a))}} d\theta \: \int_0^{2 a-z} dr \, r = (2 a-z)^2 \left[\pi - 2\arcsin{\left(1-\frac{z}{2 a} \right)}\right] $$
$$A_2 = 2 \int_0^{\arcsin{(1-z/(2 a))}} d\theta \: \int_0^{2 a \sin{\theta}} dr \, r = 2 a^2 \left [ \arcsin{\left(1-\frac{z}{2 a} \right)} - \left(1-\frac{z}{2 a} \right) \sqrt{1-\left(1-\frac{z}{2 a} \right)^2} \right ]$$
The cross-sectional area $A(z)=A_1+A_2$; we integrate over $z$ to get the volume.  We may make the substitution $u=1-z/(2 a)$ and get
$$V=4 a^3 \int_0^1 du \: [\pi u^2 +(1- 2 u^2) \arcsin{\sqrt{1-u^2}} -u \sqrt{1-u^2}]$$
or
$$V= \left (2 \pi - \frac{32}{9}\right )a^3$$
A: Converting the Cartesian equation of the base ($z=0$) of the given vertical cylinder, which is centered at $(0,a)$ and has radius $a$
$$x^{2}+y^{2}=2ay\Leftrightarrow x^{2}+\left( y-a\right) ^{2}=a^{2}\tag{1}$$
to polar coordinates $x=r\cos \theta ,y=r\sin \theta $ I got 
$$r=2a\sin \theta ,\tag{1a}$$
because $x^{2}+y^{2}=r^{2}$, $r\ge 0$, and 
$$
\begin{eqnarray*}
x^{2}+y^{2}-2ay &=&0\Leftrightarrow r^{2}-2ar\sin \theta =0 \\
\Leftrightarrow r\left( r-2a\sin \theta \right)  &=&0\Leftrightarrow r=2a\sin \theta .\tag{1b}
\end{eqnarray*}
$$
Note that $(1\mathrm{a})$ may be found directly from the figure below using simple trigonometry.

$$\text{Disk }R=\{(x,y)\in\mathbb{R}^2:  0\le x^{2}+\left( y-a\right) ^{2}\le a^{2} \};\, 0\leq r\leq 2a\sin \theta , 0\leq \theta \leq \pi .$$
The volume of the region inside the cylinder and bounded from below by the plane $z=0$ and from above by the given cone 
$$z=2a-\sqrt{x^{2}+y^{2}}=2a-r\tag{2}$$ 
can be expressed by the double integral
$$
V=\iint_{R}2a-\sqrt{x^{2}+y^{2}}\,dA,\tag{3}
$$
where $R$ is the disk whose boundary is $(1)$. In polar
coordinates $dA=dx\, dy=r\,dr\,d\theta $ and $R$ is defined
by $0\leq r\leq 2a\sin \theta $, with $0\leq \theta \leq \pi $. So $(3)$ is transformed into
$$
\begin{eqnarray*}
V &=&\int_{0}^{\pi }\left( \int_{0}^{2a\sin \theta }\left( 2a-r\right)
\,r\,dr\right) \,d\theta \tag{4}  \\
&=&\int_{0}^{\pi }\left. ar^{2}-\frac{1}{3}r^{3}\right\vert _{0}^{2a\sin
\theta }\,d\theta  \\
&=&a\int_{0}^{\pi }\left( 2a\sin \theta \right) ^{2}\,d\theta -\frac{1}{3}
\int_{0}^{\pi }\left( 2a\sin \theta \right) ^{3}\,d\theta  \\
&=&2a^{3}\pi -\frac{32}{9}a^{3}=\left( 2\pi -\frac{32}{9}\right) a^{3},
\end{eqnarray*}
$$
where the integrals of $\sin^2\theta$ and $\sin^3\theta$ were evaluated as follows:
$$
\begin{eqnarray*}
\int_{0}^{\pi }\sin ^{2}\theta \,d\theta  &=&\int_{0}^{\pi }\frac{1-\cos
2\theta }{2}\,d\theta =\frac{\pi }{2},\tag{4a} \\
\int_{0}^{\pi }\sin ^{3}\theta \,d\theta  &=&\int_{0}^{\pi }\frac{3\sin
\theta -\sin 3\theta }{4}\,d\theta =\frac{4}{3}.\tag{4b}
\end{eqnarray*}
$$
Final comment. Perhaps in a closer relation to the spirit of the question the double integrals $(3)$ and $(4)$ may be written as triple integrals, respectively, 
$$
\begin{equation*}
V=\iint_{R}\left( \int_{0}^{2a-\sqrt{x^{2}+y^{2}}}dz\right) \,dA
\end{equation*}\tag{3$^\prime$}
$$
and
$$
\begin{equation*}
V=\int_{0}^{\pi }\left( \int_{0}^{2a\sin \theta }\left(
\int_{0}^{2a-r}dz\right) \,r\,dr\right) \,d\theta .\tag{4$^\prime$}
\end{equation*}
$$
