# Proof for volume of n-ball with radius 1

I'm trying to prove this formula from here, that the volume of a n-ball with radius 1 (let's call it $$B_n$$) is: $$\frac{\pi^{n/2}}{\Gamma(\frac{n}{2}+1)}$$

However, I come to the wrong result and I cannot find the mistake.

The intersection of an n-ball with a hyperplane is an $$(n − 1)$$-ball. Therefore:

$$\text{vol}(B_{n+1}) = \int_{-1}^1 \text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2})) \,\,dx =$$

$$2 \int_{0}^1 \text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2})) \,\,dx$$

Now I want to find $$\text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2}))$$. That is per definition $$\int_{-1}^1 \,\,1_K$$ where $$K = \{(x_1, ..., x_{n}) \,\,|\,\, x_1^2 + ...+ x_n^2 \leq \sqrt{1-x^2} \}$$.

It holds: $$x_1^2 + ...+ x_n^2 \leq \sqrt{1-x^2} \Leftrightarrow \sum \frac{x_i^2}{\sqrt{1-x^2}} \leq 1$$

Now I do the transformation $$x_i \mapsto x_i \cdot (\sqrt{1-x^2})^{1/2}$$. The determinant of the Jacobian is $$(\sqrt{1-x^2})^{n/2}$$.

So I get:

$$2 \int_{0}^1 \text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2})) \,\,dx =$$

$$2 \int_{0}^1 \text{vol}(B_{n}) \cdot (\sqrt{1-x^2})^{n/2} \,\,dx =$$

$$2 \int_{0}^1 \text{vol}(B_{n}) \cdot (1-x^2)^{n/4} \,\,dx$$

Here I would use induction now.

But above formula isn't correct. For $$n=2$$ it's correct, but for $$n=3$$ it would state that $$\text{vol}(B_{3}) = 2 \int_{0}^1 \text{vol}(B_{2}) \cdot (1-x^2)^{3/4} \,\,dx = 2 \pi \cdot \int_{0}^1 (1-x^2)^{3/4} \,\,dx$$

which according to Wolfram Alpha doesn't equal $$\frac{3}{4}\pi$$, which would be the correct answer.

• Shouldn't it be the sum of $x_i^2$? You seem to be missing the square. Commented Jan 4, 2022 at 10:42
• @peek-a-boo Yes, that was a typo, thx. It doesn't change the outcome though Commented Jan 4, 2022 at 10:50

You have two errors. The formula for volume is wrong by a factor of 2. The volume is proportional to $$r^n$$, not $$r^{n/2}$$ $$\text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2}))$$ The second error is that if you want to calculate the volume of the 3D sphere, the $$n$$ on the right hand side is $$2$$, not $$3$$. So $$\text{vol}(B_{3}) = 2 \int_{0}^1 \text{vol}(B_{2}) \cdot (1-x^2)^{2/2} \,\,dx=2\pi\frac23$$

• Ah! You mean it should be $\text{vol}((B_{n} \,\,| \,\,\text{Radius = }1-x^2))$ instead of $\text{vol}((B_{n} \,\,| \,\,\text{Radius = }\sqrt{1-x^2}))$. Right? Commented Jan 4, 2022 at 11:04
• No, the radius is indeed $r=\sqrt{1-x^2}$. But $B_2(r)$ is proportional to $r^2$, so $(\sqrt{1-x^2})^2=1-x^2$ Commented Jan 4, 2022 at 19:45

The correct recurrence is $$\text{Vol}(B_1)=\text{length}((-1,1))=2$$, and for any $$n\geq 1$$, \begin{align} \text{Vol}(B_{n+1})&=\int_{-1}^1\text{Vol}(B_n\,; \text{radius} \sqrt{1-x^2})\,dx\\ &=2\int_0^1\text{Vol}(B_n) \left(\sqrt{1-x^2}\right)^n\,dx\\ &=2\text{Vol}(B_n)\int_0^1(1-x^2)^{n/2}\,dx \end{align}

If you wish to evaluate this more explicitly, make the substitution $$t=x^2$$, then \begin{align} 2\int_0^1(1-x^2)^{n/2}\,dx&=2\int_0^1(1-t)^{n/2}\frac{dt}{2\sqrt{t}}\\ &=\int_0^1t^{-1/2}(1-t)^{n/2}\,dt\\ &:=B\left(\frac{1}{2},\frac{n}{2}+1\right), \end{align} where $$B(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\,dt$$ is the Beta function. Using the functional equation, we have that $$B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$, and thus $$B\left(\frac{1}{2},\frac{n}{2}+1\right)=\frac{\sqrt{\pi}\,\Gamma\left(\frac{n}{2}+1\right)}{\Gamma\left(\frac{n+1}{2}+1\right)}$$, where we used the fact that $$\Gamma(\frac{1}{2})=\sqrt{\pi}$$. Therefore, \begin{align} \text{Vol}(B_{n+1})&=\text{Vol}(B_n)\cdot \frac{\sqrt{\pi}\,\Gamma\left(\frac{n}{2}+1\right)}{\Gamma\left(\frac{n+1}{2}+1\right)}. \end{align} Now, you can solve this recurrence.

Let $$p\geq 3$$ be an integer, I note $$V_p(r)$$ the volume of a $$p$$-dimensional ball of radius $$r$$. Here is the integral definition of the volume: $$V_p(r) = \int_{\mathbb{R}^p}\mathbf{1}_{||x||\leq r}\text{Leb}_p(dx),$$ with $$\text{Leb}_p$$ the Lebesgue measure on $$\mathbb{R}^p$$. The change of variables $$y = r^{-1}x$$ gives $$V_p(r) = \int_{\mathbb{R}^p}\mathbf{1}_{||y||\leq 1}\det(r^{-1}\mathbf{I_p})^{-1}\text{Leb}_p(dy)$$ so we have $$V_p(r)= r^p V_p(1).$$

An application of Fubini theorem gives: \begin{align} V_p(1) &= \int_{\mathbb{R}^p}\mathbf{1}_{\sum x_i^2\leq 1}dx_1\ dx_2 \dots dx_p,\\ &= \int_{\mathbb{R}^2}\mathbf{1}_{ x_1^2+x_2^2\leq 1}\int_{\mathbb{R}^{p-2}}\mathbf{1}_{x_3^2+\dots+x_p^2\leq 1 - x_1^2-x_2^2}dx_3 \dots dx_p\ dx_1\ dx_2,\\ &= \int_{x_1^2+x_2^2\leq 1}V_{p-2}(\sqrt{1-x_1^2-x_2^2})dx_1\ dx_2. \end{align} Now we can compute a polar change of variables: \begin{align} V_p(1) &= \int_0^{+\infty}\int_0^{2\pi}\mathbf{1}_{r^2\leq 1}V_{p-2}(\sqrt{1-r^2})rd\theta\ dr,\\ &= 2\pi\int_0^1 r V_{p-2}(\sqrt{1-r^2}) dr,\\ &= 2\pi V_{p-2}(1)\int_0^1 r(1-r^2)^{p/2-1} dr. \end{align} The term under the integral is the derivative of $$r\mapsto -p^{-1}(1-r^2)^{p/2}$$. We have $$V_p(1) = \frac{2\pi}{p}V_{p-2}(1).$$

Now we proceed by an immediate recurrence, for all $$p\in\mathbb{N}^*$$, $$V_{2p}(1) =\frac{\pi^{p-1}}{p!}V_2(1)\ \text{and}\ V_{2p-1} = \frac{(2\pi)^{p-1}}{\Pi_{k=1}^{p-1}(2p-1-2k)}V_1(1).$$ So finally $$V_{2p}(1) = \frac{\pi^p}{p!}$$ and $$V_{2p+1}(1) = \frac{2^{p+1}\pi^p}{(2p+1)(2p-1)\dots 3}.$$