Grant Sanderson recently gave an amazing
talk about the volumes of higher
dimensional spheres in which here mentioned that a similar results to that which
he showed in the talk can be derived using the gamma function. Since we’ve
already looked at the gamma function, it’s relation the zeta function, and its
relation to the prime numbers, what if we could by extension relate the volume
of a unit n-ball to the prime numbers? In this post we’ll first concentrate on
seeing how the volume of a unit n-ball relates to the gamma function, and
we’ll take this further in future posts.
A unit n-ball is defined as the set of all points in n-dimensions whose
distance from the origin is 1.
We know that a line segment of radius 1 has length 2 (think of this as
a 1-D sphere), a disk (i.e. a circle) of radius 1 has an area of π, and
a sphere of radius 1 has a volume of 34π. So the volume of a unit
ball in n dimensions is obviously
Vn=Γ(2n+1)πn/2
right? But in all seriousness, getting to this expression is actually
surprisingly intuitive once we know the starting point, which is looking at the
famous Gaussian integral:
∫−∞∞e−x2dx=π
Moving up to n dimensions we can define:
∣x2∣=x12+x22+⋯+xn2
We then consider the integral the integral over n dimensional space:
∫Rne−∣x2∣dV
Since
e−∣x2∣=e−(x12+x22+⋯+xn2)=e−x12e−x22⋯e−xn2
the integral splits into a product of one-variable functions. This means the
whole n-dimensional integral factors is
∫Rne−∣x2∣dV=(∫−∞∞e−x2dx)n
Then using Gaussian result in 1D we get:
∫Rne−∣x2∣dV=(π)n=πn/2
The next step is the consider this same integral but integrating with respect to
the distance from the origin rather than x. We, therefore, convert the integral
from the cartesian coordinates, (x1,x2,⋯,xn), to polar coordinates,
(r,θ). In polar coordinates the function e∣−x2∣ depends on the
distance r=∣x∣, not direction, so points at the same distance from the
origin all contribute the same value.
In 3D the volume of a thin shell of radius r and thickness dr is
approximated as
surface area of a sphere of radius r×dr
This can be extended to n dimensions. If Sn−1 is the surface are of the
unit sphere in n dimensions, then the surface area of a sphere with radius r
is
dVn=Sn−1rn−1
So a thin shell of radius r and thickness dr has volume
Sn−1rn−1dr
Applying this the volume integral we defined above:
This isn’t far off the radial integral we showed above. If we make the
substitution t=r2, then
drdt=2r⇒dr=2rdtr=t1/2,rn−1=(t1/2)n−1=t(n−1)/2
Substituting everything back into the integral we get
Sn−1∫0∞e−r2rn−1dr=Sn−1∫0∞e−tt(n−1)/22t1/2dt
We can simplify this by combining the powers of t:
t(n−1)/2⋅t−1/2=t(n−2)/2=t(n/2)−1
With this the radial integral becomes
Sn−1∫0∞e−r2rn−1dr=2Sn−1∫0∞e−tt(n/2)−1dt
which we can note is exactly the Gamma function for s=2n:
Sn−1∫0∞e−r2rn−1dr=2Sn−1Γ(2n)
Remember that we had the Gaussian integral in cartesian coordinates as
∫Rne−∣x2∣dV=Sn−1∫0∞e−r2rn−1dr=πn/2
And from the spherical shell calculation we have
∫Rne−∣x2∣dV=2Sn−1Γ(2n)
And so, equating the two gives us
πn/2=2Sn−1Γ(2n)
Rearranging for Sn−1:
Sn−1=Γ(n/2)2πn/2
which gives us an formula for the surface area of a unit sphere in n
dimensions. This itself is a very nice expression, but it can relatively simply
be used to find an expression for volume.
Remember we said that for thin shell of radius r and thickness dr has
volume
dVn=Sn−1rn−1dr
So for a unit ball, we can integrate both sides from 0 to 1 to get the
volume:
Vn=Sn−1∫01rn−1dr=nSn−1
Substituting in the expression we had for Sn−1:
Vn=n1⋅Γ(n/2)2πn/2
Recall the identity for the Gamma function:
Γ(z+1)=zΓ(z)
Since we have Γ(n/2), z=2n, and so,
Γ(2n+1)=2nΓ(2n)
Notice that in out volume expression we a factor of nΓ(n/2)2.
Taking the reciprocal of both sides of the above formula:
Γ(n/2+1)1=nΓ(n/2)2
And so, substituting this back into the volume expression we get:
Vn=Γ(2n+1)πn/2
which is the general formula for a unit n-ball. One of the definitions of the
Gamma function is
Γ(z)=(z−1)!
And so, the volume formula can also be written as
Vn=(n/2)!πn/2
which is pretty amazing. Just to confirm that this formula works, consider an
n−-ball in 1, 2 and 3, dimensions (i.e. a line segment, a circle and
a sphere with radius 1). In 1D:
Recall that the value of ζ(s)=6π2. And so we have:
V4=3ζ(2)
A wild zeta function appears. In a future post we’ll look more closely at how
the Riemann zeta function relates to the the volume of an n-ball, and by
extension the prime numbers.