I am required to find the volume common to ellipsoid $\frac{x^2}{a^2}+\frac{y^2}{a^2}+\frac{z^2}{b^2} = 1$ and cylinder $x^2 + y^2 = ay$
I set up the following triple integral:
$$V=2\cdot \int_{}^{}\int_{R}^{}\int_{z=0}^{\frac{b}{a}\cdot \sqrt{a^2 - x^2 - y^2}}dz\cdot dR= 2\frac{b}a \cdot \int_{}^{}\int_{R}^{} \sqrt{a^2 - x^2 - y^2} dy dx$$ where R: $x^2+y^2=ay$
Using $x=r\cos(t), y=r\sin(t), dydx = rdrdt$
$$V=2\cdot \frac{b}a \int_{t=0}^{\pi}\int_{r=0}^{asin(t)} \sqrt{a^2 -r^2}\cdot r \;\; dr dt \; \; \; \; equation -(1)$$
Let $a^2-r^2=m \Rightarrow r\cdot dr=\frac{-1}2dm$
$$V=2\cdot \frac{b}{a}\cdot \frac{-1}2\cdot \int_{t=0}^{\pi}\int_{m=a^2}^{a^2cos^2(t)} \sqrt{m}\;\; dm dt = \frac23\cdot \frac{b}{a}\cdot a^3\cdot \int_{t=0}^{\pi}1-\cos^3(t) \; dt $$
Now $\cos^3(\pi-t)=-\cos^3(t) $ Hence its integration is $0$ over $0 $ to $\pi$
$$V=\frac23\cdot ba^2 \cdot(\pi) $$
However the answer given to be is $\frac43 ba^2 (\frac\pi2-\frac23)$
The thing confusing me is if I had used symmetry in equation $(1)$ and multiplied the integral by $2$ in order to reduce the limits of $t$ from $0$ to $\pi/2 $, I am getting the desired result as below :
From equation -$(1)$
$$V=2\cdot \frac{b}a \int_{t=0}^{\pi}\int_{r=0}^{asin(t)} \sqrt{a^2 -r^2}\cdot r \;\; dr dt $$
$$= 4\frac{b}a \int_{t=0}^{\pi/2}\int_{r=0}^{asin(t)} \sqrt{a^2 -r^2}\cdot r \;\; dr dt = 4\frac{b}a \cdot \frac{-1}2\int_{t=0}^{\pi/2}\int_{m=a^2}^{a^2cos^2(t)} \sqrt{m}\; dmdt$$
$$ = 2\frac{b}a \cdot a^3\cdot \frac23 \int_{0}^{\pi/2}1-cos^3(t)\; dt = \frac43\cdot ba^2 (\frac\pi2-\frac23)$$
Where am I going wrong in the first method?
In the first integral the set up should be
$$V=2\cdot \int_{}^{}\int_{R}^{}\int_{z=0}^{\sqrt{b^2 - \frac{b^2}{a^2}x^2 - \frac{b^2}{a^2}y^2}}dz\cdot dR$$
It seems that the problem is in this step for $(a^2\cos^2 t)^\frac32=a^3|\cos t|^3$ and thus
$$V=2\cdot \frac{b}{a}\cdot \frac{-1}2\cdot \int_{t=0}^{\pi}\int_{m=a^2}^{a^2cos^2(t)} \sqrt{m}\;\; dm dt = \frac23\cdot \frac{b}{a}\cdot a^3\cdot \int_{t=0}^{\pi}1-\color{red}{|\cos(t)|^3} \; dt$$