<s>[INST] Find the volume common to sphere $x^2+y^2+z^2$ and the cylinder $x^2+y^2Find the volume common to sphere $x^2+y^2+z^2<1$ and the cylinder $x^2+y^2<ax$
I set up the following integral :
$$I=2\cdot \iiint_{z=0}^{\sqrt{a^2-x^2-y^2}} dz\,dy\,dz = 2\cdot\iint_E\sqrt{a^2-x^2-y^2} \, dy\,dx$$ where $E:x^2+y^2=ax$
Now under polar coordinates 
$E:r=a\cos(\theta)$
and so $0\leq r \leq a\cos(\theta)$ and $-\pi/2\leq \theta \leq \pi/2$
$$I= 2\cdot\int_{\theta=-\pi/2}^{\pi/2}\,\int_{r=0}^{a\cos(\theta)} \sqrt{a^2-r^2}\,r\,dr\,d\theta=2\cdot (1/2)\cdot(2/3)\int_{\theta=-\pi/2}^{\pi/2}a^3\cdot(1-\sin^3(\theta))d\theta = \frac{2a^3}{3}\cdot\{\int_{\theta=-\pi/2}^{\pi/2} d\theta - \int_{\theta=-\pi/2}^{\pi/2}\sin^3(\theta)d\theta\} = \frac{2\pi a^3}{3}$$
However answer given to me is $$\frac{2a^3}{3}\cdot(\pi - \frac43)$$
Where am I making the mistake? Or is it the case that the answer given to me is incorrect?
 [/INST] Assuming $a<1/2$, here's the proper integral:
$$\int\limits_{x=0}^a \int\limits_{y=0}^\sqrt{x(a - x)} \int\limits_{z=0}^\sqrt{1 - x^2 - y^2} 4\ dx\ dy\ dz$$
</s>