Find the solid of the volume restricted above to the sphere $x^2+y^2+z^2=a^2$ and down to $z=b>0$ .
I think in spherical coordinates system the volume is given by :$$\int_{0}^{\frac{\pi}{2}}\int_{0}^{2\pi}\int_{b}^{a}\rho^2\sin\left(\varphi\right)d \rho d \theta d\varphi$$
I also tried to use Cartesian coordinate system and I think the volume is : $$\int_{-\sqrt{a^{2}-b^{2}}}^{\sqrt{a^{2}-b^{2}}}\int_{-\sqrt{a^{2}-x^{2}-b^{2}}}^{\sqrt{a^{2}-x^{2}-b^{2}}}\int_{b}^{\sqrt{a^{2}-x^{2}-y^{2}}}dzdydx$$
The only issue is that I'm not sure if the two integrals are the same, and if not then which one of them is correct and why the other one is not.
While the question states the lower bound of $z$ as $z = b \gt 0$, it should also state that $b \lt a$ otherwise there is no volume bound.
The second integral is set up correctly but the first integral has mistakes -
The equation of the plane is $z = b$ which in spherical coordinates is,
$\displaystyle z = \rho \cos\phi = b \implies \rho = \frac{b}{\cos\phi} \ $ is the lower bound of $\rho$
Now for upper bound of $\phi$, at the intersection of the sphere $\rho = a$ and the plane, $\displaystyle \rho = \frac{b}{\cos\phi}$, $\cos \phi = \displaystyle \frac{b}{a} \implies \phi = \arccos \bigg(\frac{b}{a}\bigg) \ $ is the upper bound of $\phi$.