The cylinder is $x^2 +y^2 = 1$ and the sphere is $x^2 + y^2 + z^2 = 4$. I have to find the volume of the region outside the cylinder and inside the sphere. The triple spherical integral for this problem is (from the answer key) $$\int _0^{2\pi }\int _{\frac{\pi }{6}}^{\frac{5\pi }{6}}\int _{csc\phi }^2\:\rho ^2sin\phi \:d\rho \:d\phi \:d\theta $$
What is confusing me here is that there's some space at the endcaps of the cylinder that is not being accounted for. Why is this the case?


Why don't you just compute the $2$ volumes?
The cilinder has volume $V_c=\pi\cdot 2\sqrt{3}$ and the sphere has volume $V_s=\frac{4}{3}\pi*2^3$.
The volume inside the sphere and outside the cilinder is $V_s-V_c=\pi(\frac{2^5}{3}-2\sqrt{3})$.