# Volume of cylinder inside a sphere

Let $$T$$ be the region within the sphere $$x^2+y^2+z^2=4$$ and within the cylinder within the sphere $$x^2+(y-1)^2=1$$. Use polar coordinates to calculate the volume of $$T$$.

What I am thinking is we have

$$z=\pm \sqrt{4-r^2}$$ after converting $$(x,y)\rightarrow (r\cos \theta, r \sin \theta)$$, setting up the integral we have

$$\int_0^{2\pi } \int_0^r \int_{-z}^zrdzdrd\theta =\int_0^{2\pi}\int_0^{2\cos \theta}\int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}rdzdrd\theta$$

My question is did I set up the integral or did I completely blow it? Also I'm unsure whether $$r=2 \cos\theta$$ is the right limit for $$r$$, so if someone could confirm or correct this with a small explanation, that would be most helpful. Thanks!

• $x+(y-1)^2=1$ is not a cylinder. – Emilio Novati Feb 12 '20 at 13:49
• I'm sorry, it's $x^2+(y-1)^2 = 1$. I made a typo. – DerpyMcDerp Feb 12 '20 at 13:57

## 1 Answer

Your limit $$r=2\cos \theta$$ is wrong but without consequence on the final result given the symmetry of the figure. The cylinder intersects the $$y$$ axis at $$y=r\sin \theta=2$$ so the correct limit is $$y=2\sin \theta$$ that we reach for $$\theta=\frac{\pi}{2}$$. Your limit is for a cylinder with center on the $$X$$ axis ( that gives the same volume).

Anyway, using the symmetry of the region you can use the limits: $$0<\theta<\frac{\pi}{2}\quad 0 and express the volume as $$V=4\int_0^{\frac{\pi}{2}}\int_0^{2\sin \theta}\int_0^{\sqrt{4-r^2}} rdzdrd\theta$$

• I'm sorry for being awfully slow, but why is it exactly we integrate from $-\pi/2$ to $\pi/2$ instead of $0$ to $2 \pi$? – DerpyMcDerp Feb 12 '20 at 15:23
• The fact that $r$ is not negative, implies that we have some limits for the values of $\theta$. if we want use $0 \le \theta<2\pi$ than we must use the convention that when $r<0$ we invert the direction on the line given by the angle $\theta$ and in doing so we ''redraw'' the same curve. – Emilio Novati Feb 12 '20 at 16:31