Find the volume of the region inside both the sphere $x^2+y^2+z^2=4$ and the cylinder $x^2+y^2=1$
$$2\int_0^{2\pi}\int_0^{\frac{\pi} 6}\int_0^{2}1.r^2\sin \varphi dr d\varphi d\theta + \int_0^{2\pi}\int_{\frac{\pi} 6}^{\frac{5\pi} 6}\int_0^{\frac 1 {\sin \varphi}}1.r^2\sin \varphi dr d\varphi d\theta $$
This question is in the lecture notes but I didn't understand how the answer is obtained. Could someone help?
Note that
the intersection of the cilinder and the sphere is for $z=\pm \sqrt 3$ that is $\varphi=\frac{\pi}6$ and $\varphi=\frac{5\pi}6$
the first integral is twice the "ice cream" upper part of the sphere (in spherical coordinates)
the second integral is the residual part inside the cylinder (in spherical coordinates)
in the second integral $r(\varphi)=\frac1{\sin \varphi}$