[Jprogramming] "n-volume" of an "n-sphere"
Murray Eisenberg
murray at math.umass.edu
Wed Aug 16 14:12:15 UTC 2017
Why get decimal approximations when you can get the exact values?
With Mathematica, for example, one finds:
Table[RegionMeasure[Ball[n]], {n, 1, 10}]
{2, Pi, (4 Pi)/3, Pi^2/2, (8 Pi^2)/15, Pi^3/6, (16 Pi^3)/105, Pi^4/24, (32 Pi^4)/945, Pi^5/120}
(Actually, the output from Mathematica gives an actual Greek letter version of “Pi” and displays the fractions as actual fractions.)
Of course, an exact formula for the n-dimensional measure of the unit n-ball is known:
Pi^(n/2)
V(n) = ————----------
Gamma(1+n/2)
(If the ball has radius r rather than 1, the volume is multiplied by a factor of r^n, as one might expect.)
In even dimension n = 2 k, this reduces to:
Pi^k
V(2 k) = ——-,
k!
and this makes readily apparent that the n-volumes readily decrease for k >= 3 as k continues to grow.
(The formula is more complicated for odd n.)
> On 16 Aug2017, at 8:00 AM, programming-request at forums.jsoftware.com wrote:
>
> Tue, 15 Aug 2017 19:33:09 +0000
> From: Ben Gorte - CITG <B.G.H.Gorte at tudelft.nl <mailto:B.G.H.Gorte at tudelft.nl>>
> To: "programming at jsoftware.com <mailto:programming at jsoftware.com>" <programming at jsoftware.com <mailto:programming at jsoftware.com>>
> Subject: Re: [Jprogramming] "n-volume" of an "n-sphere"
> Message-ID:
> <5BD81DCC576258458EBBACD3072FDF913A525B78 at SRV384.tudelft.net <mailto:5BD81DCC576258458EBBACD3072FDF913A525B78 at SRV384.tudelft.net>>
> Content-Type: text/plain; charset="us-ascii"
>
> A little surprise (to me) was
> plot 1 sphvol i.30
> (for example)
>
> Can you predict it?
>
> greetings,
> Ben
> ________________________________________
> From: Programming [programming-bounces at forums.jsoftware.com <mailto:programming-bounces at forums.jsoftware.com>] on behalf of Raul Miller [rauldmiller at gmail.com <mailto:rauldmiller at gmail.com>]
> Sent: Tuesday, August 15, 2017 19:55
> To: Programming forum
> Subject: [Jprogramming] "n-volume" of an "n-sphere"
>
> sphvol=: (1p1&^%!)@-:@] * ^
> 1 sphvol 3
> 4.18879
> 1 sphvol i.7
> 1 2 3.14159 4.18879 4.9348 5.26379 5.16771
>
> Left argument is the radius of the "n-sphere".
>
> Right argument is the number of dimensions.
>
> I put "n-volume" in quotes, because if the dimension is 2 (for
> example), the "n-volume" is what we call the area of the circle. (And
> if the dimension is 1 that "n-volume" is the length of a line
> segment).
>
> Anyways, I stumbled across this and thought it might be interesting
> for someone else.
——
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 240 246-7240 (H)
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305
More information about the Programming
mailing list