# Volume of a hypersphere

In this appendix we will compute the volume of an $\ell$ -dimensional hypersphere of radius $R$ , which we call $V_{\ell }(R)$ . This is defined as:

$V_{\ell }(R)=\int \Theta (R-|{\vec {p}}|)d{\vec {p}}$ In order to calculate it we will use a "trick". First, we change variable defining ${\vec {z}}$ so that $p_{i}=Rz_{i}$ and thus:
$V_{\ell }(R)=R^{\ell }\int \Theta (1-|{\vec {z}}|)d{\vec {z}}=R^{\ell }V_{\ell }(1)$ We then have:
${\frac {d}{dR}}V_{\ell }(R)=\ell R^{\ell -1}V_{\ell }(1)=\int \delta (|{\vec {p}}|-R)d{\vec {p}}$ Multiplying both sides by ${\textstyle e^{-R^{2}}}$ and integrating over $R$ from $0$ to infinity:
$V_{\ell }(1)\int _{0}^{\infty }e^{-R^{2}}\ell R^{\ell -1}dR=\int _{0}^{\infty }dR\int e^{-R^{2}}\delta (|{\vec {p}}|-R)d{\vec {p}}$ The right hand side is equal to:
$\int _{0}^{\infty }dR\int e^{-R^{2}}\delta (|{\vec {p}}|-R)d{\vec {p}}=\int d{\vec {p}}\int _{0}^{\infty }e^{-R^{2}}\delta (|{\vec {p}}|-R)=\int d{\vec {p}}e^{-|{\vec {p}}|^{2}}$ Therefore:
$\ell V_{\ell }(1)\int _{0}^{\infty }R^{\ell -1}e^{-R^{2}}dR=\int d{\vec {p}}\prod _{i=1}^{\ell }e^{-p_{i}^{2}}=\prod _{i=1}^{\ell }\underbrace {\int dp_{i}e^{-p_{i}^{2}}} _{\sqrt {\pi }}=\pi ^{\ell /2}$ If we now define ${\textstyle t=R^{2}}$ , in the integral in the left hand side of the equation we recognise the definition of Euler's $\Gamma$ function:
$\ell \int _{0}^{\infty }R^{\ell -1}e^{-R^{2}}dR={\frac {\ell }{2}}\int _{0}^{\infty }e^{-t}t^{{\frac {\ell }{2}}-1}dt={\frac {\ell }{2}}\Gamma \left({\frac {\ell }{2}}\right)=\Gamma \left({\frac {\ell }{2}}+1\right)$ This way the volume of an $\ell$ -dimensional sphere of unit radius is ${\textstyle V_{\ell }(1)=\pi ^{\ell /2}/\Gamma \left({\frac {\ell }{2}}+1\right)}$ , and thanks to the fact that $V_{\ell }(R)=R^{\ell }V_{\ell }(1)$ , in the end we have:
$V_{\ell }(R)={\frac {R^{\ell }\pi ^{\ell /2}}{\Gamma \left({\frac {\ell }{2}}+1\right)}}$ Let us verify that this formula returns the values we expect for $\ell =2$ and $\ell =3$ . We first note that:
$\Gamma \left({\frac {1}{2}}\right)=\int _{0}^{\infty }e^{-t}t^{-1/2}dt={\sqrt {\pi }}$ $\Gamma \left({\frac {5}{2}}\right)={\frac {3}{2}}\Gamma \left({\frac {3}{2}}\right)={\frac {3}{2}}\cdot {\frac {1}{2}}\Gamma \left({\frac {1}{2}}\right)={\frac {3}{4}}{\sqrt {\pi }}$ This way:
$V_{2}(R)={\frac {R^{2}\pi ^{2/2}}{\Gamma (2)}}={\frac {\pi R^{2}}{1!}}=\pi R^{2}\quad \quad V_{3}(R)={\frac {R^{3}\pi ^{3/2}}{{\frac {3}{4}}{\sqrt {\pi }}}}={\frac {4}{3}}\pi R^{3}$ which is exactly what we expected.
1. We also use the fact that $\Theta (R(1-z))=\Theta (1-z)$ , since $R>0$ .
2. As a remainder, the $\Gamma$ function is defined as:
$\Gamma (n)=\int _{0}^{\infty }e^{-t}t^{n-1}dt$ If $n\in \mathbb {N}$ , then $\Gamma (n)=(n-1)!$ .