<s>[INST] Volume of a cut sphere The sphere $x^2 + y^2 + z^2 = 4$ is cut by the plane $z = 1/2$. How do you calculate the volume of two parts of the sphere using integrals? Thank you!
 [/INST] The standard setup is
$$
\begin{align}
\int_\frac{1}{2}^2\int_{-\sqrt{4-z^2}}^\sqrt{4-z^2}\int_{-\sqrt{4-z^2-y^2}}^\sqrt{4-z^2-y^2}\;\mathrm{d}x\;\mathrm{d}y\;\mathrm{d}z
&=\int_\frac{1}{2}^2\int_{-\sqrt{4-z^2}}^\sqrt{4-z^2}2\sqrt{4-z^2-y^2}\;\mathrm{d}y\;\mathrm{d}z\\
&=\int_\frac{1}{2}^2\pi(4-z^2)\;\mathrm{d}z\tag{1}
\end{align}
$$
and
$$
\begin{align}
\int_{-2}^\frac{1}{2}\int_{-\sqrt{4-z^2}}^\sqrt{4-z^2}\int_{-\sqrt{4-z^2-y^2}}^\sqrt{4-z^2-y^2}\;\mathrm{d}x\;\mathrm{d}y\;\mathrm{d}z
&=\int_{-2}^\frac{1}{2}\int_{-\sqrt{4-z^2}}^\sqrt{4-z^2}2\sqrt{4-z^2-y^2}\;\mathrm{d}y\;\mathrm{d}z\\
&=\int_{-2}^\frac{1}{2}\pi(4-z^2)\;\mathrm{d}z\tag{2}
\end{align}
$$
You might only need the last integral of each, but I started at ground-zero.
</s>