Volume between sphere and cylinder Find the volume of the portion of the sphere $x^2 + y^2 + z^2$=$a^2$ lying inside the cylinder $x^2 +y^2$=ay
I think we are supposed to do it in spherical coordinate system but i don't know how to set up limits ...the only thing i can get from the question is r =$\sqrt{ay}$....How would you set the azimuthal and polar angle.Help
 A: Given the $z$-orientation of the cylinder, the volume integral is better suited for the cylindrical coordinates, whereby the sphere and the cylinder are,
$$r^2+z^2=a^2,\>\>\>\>\>r=a\sin\theta$$
Then, the limits for the z-integral is $\pm\sqrt{a^2-r^2}$ and for the $r$-integral is from 0 to $a\sin\theta$, that is,
$$V=\int_0^{\pi}\int_0^{a\sin\theta}\int_{-\sqrt{a^2-r^2}}^{\sqrt{a^2-r^2}}dz\>rdrd\theta$$
$$=\int_0^{\pi}\int_0^{a\sin\theta}2\sqrt{a^2-r^2}rdrd\theta=\frac23a^3\int_0^{\pi}(1-|\cos^3\theta|)d\theta=\frac29(3\pi-4)a^3$$
A: 
Projecting to the $xy$-plane you will get the figure above. The inner circle has diameter $a$, and you can prove that at the angle $\theta$, $\overline{AB} = a\sin\theta$. So converting to the polar coordinate, the integral becomes
$$
\begin{aligned}
2\int_0^\pi\int_0^{a\sin\theta} \sqrt{a^2-r^2}r drd\theta &= 2\int_0^\pi -\frac13(a^2-r^2)^{3/2} \Bigg|_0^{a\sin\theta}d\theta\\
&= \frac43\int_0^{\pi/2} a^3(1-\cos^3\theta)d\theta\\
&= \frac23a^3\pi - \frac43a^3\int_0^{\pi/2}\cos^3\theta d\theta\\
&= \frac23a^3\pi - \frac43a^3\left(\sin\theta - \frac13\sin^3\theta\right)\Bigg|_0^{\pi/2}\\
&= \left(\frac23\pi-\frac89\right)a^3.
\end{aligned}
$$
A: IF you allow traslating in $a/2$ and scaling each linear dimension by letting $a/2$, we simply have to integrate the sphere top and bottom, in the unit circle: 
$$
f(x,y)=2\sqrt{4-x^2-(y-1)^2}
$$
And in there, the limits for x simply all the values from -1 to 1, and for y the proper radius from the circle from the negative to the positive values:
$$
\int_{-1}^1\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}2\sqrt{4-x^2-(y-1)^2} \ dy \ dx 
$$
The final requested volume is obtained rescaling the last figure by $(a/2)^3$:
$$
V={a^3\over 8}\int_{-1}^1\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}2\sqrt{4-x^2-(y-1)^2} \ dy \ dx 
$$
The indefinite integral will be hard, but evaluating this expression should give a value close to $V=1.2054a^3$
