<s>[INST] Volume of a solid 2 I've tried to solve this exercise but the answer is different from the one on my notes: using cilindrical coordinates compute the volume of the subset of $\mathbb{R}^3$ defined by:
$z \geq 0$, $x^2+y^2+z^2 \leq 4$, $x^2-2x+y^2 \leq 0$.
My solution:
$$
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\left ( \int_{0}^{2\cos \theta} \rho \left ( \int_{0}^{\sqrt{4-\rho^2}}dz \right )d\rho \right )d\theta=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \left ( -\frac{1}{3}\sqrt{(4-\rho^2)^3}|^{2 \cos \theta}_0 \right )d \theta= -\frac{8}{3}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sqrt{(1- \cos^2 \theta)^3} +\frac{8}{3} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} d \theta =
-\frac{8}{3} \left [ -\cos \theta \sin^2 \theta -\frac{2}{3} \cos^3 \theta\right ]^{\frac{\pi}{2}}_{-\frac{\pi}{2}}+\frac{8}{3}\pi=\frac{8}{3}\pi 
$$
Can anyone please check my solution?
 [/INST] We have $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sqrt{(1- \cos^2 \theta)^3}d\theta=2\int_{0}^{\frac{\pi}{2}} \sin\theta(1- \cos^2 \theta)d\theta=2\left[-\cos\theta+\frac{\cos^3\theta}{3}\right]_{0}^{\frac{\pi}{2}}=\frac{4}{3}\not=0.$$
Hence the volume of the solid should be $\frac{8}{3}\pi-\frac{32}{9}$.
P.S. Note that $\sqrt{(1- \cos^2 \theta)^3}=|\sin\theta|(1- \cos^2 \theta)$.
</s>