Pretty much every high school student can quote the formula for the area of a circle: it’s A = pi r^2, where r is the radius. Most of them can do the same thing for the volume of a sphere: V = 4/3 pi r^3.

You could, if you wanted, generalize the concept and call circles “2-spheres”, because they’re the set of all points a given distance from the center in a 2d space. A sphere would be a “3-sphere”, because it’s the set of all points a given distance from the center in 3d space. A “1-sphere” would be the set of all points on a line equidistant from the center on a line. Of course there could only be two of them, and so the “volume” of a 1-sphere would be V = 2r. So we’ll scrap all the different words for these spheres and just call them n-spheres, and we’ll call the content of their interior the “volume”, even though in 2d (for instance) we might usually call it the area.

Now that we have volume formulas for n = 1,2,3, we might want to find the volume of higher-dimensional spheres. There’s plenty of abstract interest in the result, but there’s also plenty of use in physics for this – very often we describe phenomena in terms of phase space, which might include parameters like momentum. Each parameter is a dimension, and so though there’s not literally 100 spatial dimensions, the mathematics is still just as useful in a formal setting for describing those parameters.

Now we actually have to calculate the volumes. There’s a few ways to do it; we’ll take the “easy” trick way. From scratch, we know that the volume has to be proportional to the nth power of the radius for dimensional reasons. The only question is the constant in front of that radius. As such, we can write down the volume as a function (our Sunday Function) of r, modulo that constant:

This is a volume, so we expect we might have to integrate at some point. Might as well write down the differential now:

Now we start working on the trick. I have no idea who thought of it first, but it’s pretty clever. Essentially, we start with a very standard Gaussian integral and bootstrap our way backwards. So write down that Gaussian integral:

Now multiply it by itself n times. To keep track of all the different x’s, we’ll subscript each one of them with an i:

Yeesh. It looks a little ugly, but it appears pretty straightforwardly by the rules for multiplication of exponents. e^a times e^b = e^(a + b), etc. However, this lets us make two dramatic simplifications. The sum in the exponent is just r^2, essentially because the Pythagorean theorem works in higher dimensions. The product of the differentials is just the differential volume element, which we worked out above. So swap those facts in:

Cn is a constant, it can be pulled outside of the integral. Then the integral can be done (or looked up in a table). Its solution is in terms of the Gamma function:

Which we can recast in terms of the factorial function and solve for Cn:

Plugged into our original formula, and we have the volume of an n-dimensional sphere:

If we plug in n = 1-3, we get the constants we expect. We can also work out the volume of the next few higher dimensions just for fun:

4-volume: (1/2)π^{2}r^{4}

5-volume: (8/15)π^{2}r^{5}

6-volume: (1/6)π^{3}r^{6}

I don’t expect school kids will be memorizing those any time soon. But it’s cool to be able to tell them that we *have* figured those higher dimensions out if they ever need them.