Calculate volume between two geometric figures I have a figure C that is defined as the intersection between the sphere $x^2+y^2+z^2 \le 1 $ and the cyllinder $x^2+y^2 \le \frac{1}{4}$.
How should i calculate the volume of this figure?
 A: In cylindrical coordinates,
$$\int_0^{2\pi}2\int_0^{1/2}\sqrt{1-r^2}\,r\,dr\,d\theta=2\cdot2\pi\cdot\frac{\bar1}3\left.(1-r^2)^{3/2}\right|_0^{1/2}=\frac{4\pi}3\left(1-\frac34\sqrt{\frac34}\right).$$
A: The given cylinder and the given sphere share the sections given by $z=\pm\frac{\sqrt{3}}{2}$. If $|z|\leq\frac{\sqrt{3}}{2}$, the area of the section is $\frac{\pi}{4}$. If $\frac{\sqrt{3}}{2}\leq|z|\leq 1$, the area of the section is $\pi(1-z^2)$.
Integrating $1$ on sections, we get that the volume is given by:
$$ \frac{\pi}{4}\sqrt{3}+2\pi\int_{\sqrt{3}/2}^{1}(1-z^2)\,dz =\color{red}{\frac{\pi}{6}(8-3\sqrt{3})}.$$
A: Here is a sketch of the sphere and part of the infinite length cylinder:

(Large version)
It suggests to split the intersection volume into three volumes: 


*

*the fully enclosed cylinder part $V_m$ in the middle and 

*the two spherical caps, one on top $V_t$, one at the bottom $V_t$, where by symmetry $V_t = V_b$


At the cap base circles we have both
$$
x^2 + y^2 + z^2 = 1 \\
x^2 + y^2 = 1/4
$$
Subtracting gives
$$
z^2 = 3/4 \iff \\
z = \pm \sqrt{3}/2
$$
This gives 
$$
V_m= \pi r^2 h = \pi (1/2)^2 \cdot 2 \cdot \sqrt{3}/2 = \pi \sqrt{3}/4
$$
For the top cap we stack up disc shaped volume elements
$$
dV = A(z) \, dz
$$
where $A(z)$ is the area of a disc at height $z$ and get
\begin{align}
V_t 
&= \int\limits_{\sqrt{3}/2}^1 A(z) \, dz \\
&= \int\limits_{\sqrt{3}/2}^1 \pi r(z)^2 \, dz \\
&= \int\limits_{\sqrt{3}/2}^1 \pi (1-z^2) \, dz \\
&= \pi \, \left[z - z^3/3 \right]_{\sqrt{3}/2}^1 \\
&= \pi \left( 1-1/3 - (\sqrt{3}/2 - (\sqrt{3}/2)^3/3)  \right) \\
&= \pi \left( 2/3 - \sqrt{3}/2 + \sqrt{3}/8 \right) \\
&= \pi \left( 2/3 - 3\sqrt{3}/8 \right) \\
\end{align}
This gives
\begin{align}
V &= V_t + V_m + V_b \\ 
&= \pi \sqrt{3}/4 + 2 \pi \left( 2/3 - 3 \sqrt{3} / 8 \right) \\
&= \pi \left( 4/3 - 2 \sqrt{3}/4 \right) \\
&= \pi \left( 4/3 - \sqrt{3}/2 \right)
\end{align}
A: The volume of a sphere with hole and the volume of a cylinder with two caps on its bases:

A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

The volume $\ds{V}$ is given by $\ds{\pars{~\mbox{brackets expressions are}\ {\texttt Iverson\ Brackets}~}}$:

\begin{align}
V & =
\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}
\bracks{x^{2} + y^{2} + z^{2} \leq 1}\bracks{x^{2} + y^{2} \leq {1 \over 4}}
\dd x\,\dd y\,\dd z
\\[5mm] & =
\int_{-\infty}^{\infty}\int_{0}^{2\pi}\int_{0}^{\infty}\bracks{\rho^{2} + z^{2} \leq 1}\bracks{\rho^{2} \leq {1 \over 4}}\,
\rho\,\dd\rho\,\dd\theta\,\dd z\label{1}\tag{1}
\end{align}
In \eqref{1}, we switched to cylindric coordinates. Then,
\begin{align}
V & =
2\pi\int_{-\infty}^{\infty}\int_{0}^{1/2}
\bracks{-\root{1 - \rho^{2}} \leq z \leq \root{1 - \rho^{2}}}\,
\rho\,\dd\rho\,\dd z =
4\pi\int_{0}^{1/2}\root{1 - \rho^{2}}\rho\,\dd\rho
\\[5mm] & = \bbx{\ds{{8 - 3\root{3} \over 6}\,\pi}} \approx 1.4681
\end{align}
