<s>[INST] Calculate the volume of the solid determined by $S_1$ and $S_2$ I want to calculate the volume of the solid determined by this tho surfaces:
$$S_1=\{(x,y,z)\in\mathbb{R}:x^2+y^2+z^2=R^2\}$$
$$S_2=\{(x,y,z)\in\mathbb{R}:x^2+y^2=Rx\}$$
The solid is the intersection of a sphere of radius $R$ ($S_1$) and a cylinder of diameter $R$ (centered in $(R/2,0,0)$)($S_2$)
I guess i must change to spherical or cylindrical coordinates, and that's what i have problems with. I'm stucked in finding the new values of the variables. Also, which coordinate system will work better for this problem? Spherical or cylindrical? I will thank any help.
 [/INST] Note that $S_2$ is cylinder $$
  (x-\frac{R}{2})^2+ y^2 = (\frac{R}{2})^2 $$
We will use cylindrical coordinate : Here the curve $ z=0,\
(x-\frac{R}{2})^2+ y^2 = (\frac{R}{2})^2$ is parametrized by
$$x=r\cos\ \theta,\ y=r\sin\ \theta,\ r=R\cos\ \theta,\
-\frac{\pi}{2}\leq \theta \leq \frac{\pi}{2}$$
That cylinder has top and bottom roofs : $$z=\sqrt{R^2-x^2-y^2},\
z=-\sqrt{R^2-x^2-y^2}$$
Hence \begin{align*} dxdy &= rdrd\theta \\
  V&=
  2\int_0^{\frac{\pi}{2}}\int^{R\cos\ \theta}_0\  z \cdot  r drd\theta
  \\&=2\int_0^{\frac{\pi}{2}}\int^{R\cos\ \theta}_0\  \sqrt{R^2-r^2}
   \cdot  r drd\theta
  \\&=2\int_0^{\frac{\pi}{2}}\int^{R^2\sin^2 \theta}_{R^2}\  \sqrt{T}
  \frac{dT}{(-2)} d\theta
 \\&=  \int_0^{\frac{\pi}{2}} \ (\frac{-2}{3}) R^3 \{ \sin^3 \theta -1\}\ 
 d\theta\\&= \frac{3\pi -4}{9} R^3
\end{align*}
 since $\int\ \sin^3\theta = -\frac{1}{3}\cos\
 \theta(\sin^2\theta+2)$
</s>