P.S. If with Mathematica you do want to see decimal approximations, after the
input/output shown, do it with:
N[%] (* % is preceding output *)
{2., 3.14159, 4.18879, 4.9348, 5.26379, 5.16771, 4.72477, 4.05871, 3.29851,
2.55016}
> On 16 Aug2017, at 10:12 AM, Murray Eisenberg <[email protected]> wrote:
>
> 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, [email protected]
>> <mailto:[email protected]> wrote:
>>
>> Tue, 15 Aug 2017 19:33:09 +0000
>> From: Ben Gorte - CITG <[email protected]
>> <mailto:[email protected]>>
>> To: "[email protected] <mailto:[email protected]>"
>> <[email protected] <mailto:[email protected]>>
>> Subject: Re: [Jprogramming] "n-volume" of an "n-sphere"
>> Message-ID:
>> <[email protected]
>> <mailto:[email protected]>>
>> 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 [[email protected]
>> <mailto:[email protected]>] on behalf of Raul Miller
>> [[email protected] <mailto:[email protected]>]
>> 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 [email protected]
> <mailto:[email protected]>
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower phone 240 246-7240 (H)
> University of Massachusetts
> 710 North Pleasant Street
> Amherst, MA 01003-9305
>
>
>
>
——
Murray Eisenberg [email protected]
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 240 246-7240 (H)
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm