MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Re: Re: Tough Limit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34331] RE: [mg34286] Re: Re: [mg34235] Tough Limit
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Wed, 15 May 2002 03:35:24 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Vladimir's original numeric experiment was very good (plotting the
sinusoidal nature of the number), and he was right not to limit n to
integers without reason.

It we do limit n to integers, we could do the same experiment with
ListPlot, or we could use something like
Table[10^k+Random[Integer,{0,10^k}]] to provide examples.  Randomly
distributed examples should prevent misleading results such as what
happened when all the examples were even.

Table[n=10^k+Random[Integer,{0,10^k}];N[Binomial[-1/2,n]
    *Sqrt[n*Pi]],{k,1,4}]

{0.992219, -0.99881, 0.999919, -0.999993}

(Notice the accidental alternation of signs in this sample!)

This is very SLOW if you let k exceed 3, however:

Timing[(n=10^#+Random[Integer,{0,10^#}];N[Binomial[-1/2,
n]Sqrt[n*Pi]])&[4]]

{3.063 Second,-0.999991}

Timing[(n=10^#+Random[Integer,{0,10^#}];N[Binomial[-1/2,
n]Sqrt[n*Pi]])&[5]]

{1377.95 Second,-0.999999}

(I'm not EVEN trying the next one.)

No problem though, if you make the argument Real rather than integer:

Timing[(n = 10^# + Random[Integer, {0, 10^#}];
     N[Binomial[-1/2, n]Sqrt[n*Pi]]) &[5.]]

{0. Second, -0.999999}

So, in a ListPlot or random sample of Integers, you have to turn the
integers into Reals before evaluating.  For larger n, it could be faster
to use the Stirling or Gosper approximation (maybe).

Bobby

-----Original Message-----
From: Vladimir Bondarenko [mailto:vvb at mail.strace.net] 
To: mathgroup at smc.vnet.net
Subject: [mg34331] [mg34286] Re: Re: [mg34235] Tough Limit

Dear James,

I like very much the way you use: NUMERIC EXPERIMENT.

It is a nice research approach. We can learn a lot of
important points from such experimenting.

It was a way of Euler, Gauss, Ramanujan, and thousands
other gifted mathematicians.


But to learn  ALL  (not just a lot) we need to plan our
numeric experiments VERY carefully. (And then, ideally,
think hard about our numerics, to eschew the insidious TRAPS)

You have found that

            Table[Sqrt[n*Pi]*Binomial[-1/2, n] /. n -> 10^k, {k, 1.,
7.}]

            {0.987583, 0.998751, 0.999875, 0.999988, 0.999999, 1., 1.}
while
            Table[Sqrt[n*Pi]*Binomial[-1/2, n] /. n -> 10^k + 1, {k, 1.,
7.}]

            {-0.988705, -0.998763, -0.999875, -0.999988, -0.999999, -1.,
-1.}

Nice. Now let's have a look at our substitutions

            n -> 10^k + 0  and  n -> 10^k + 1

Why don't try something like n -> 10^k + a ?

OK. Let's learn more about this limit.

            Table[Sqrt[n Pi]*Binomial[-1/2, n] /. n -> 10^k + 1/2, {k,
1., 7.}]

            {0, 0, 0, 0, 0, 0, 0}

Mysterious... Not a vestige of  1  or  -1 ...

            Table[Sqrt[n Pi]*Binomial[-1/2, n] /. n -> 10^k + 1/3, {k,
1., 7.}]

            {0.49399, 0.499377, 0.499938, 0.499994, 0.499999, 0.5, 0.5}


            Table[Sqrt[n Pi]*Binomial[-1/2, n] /. n -> 10^k + 1/4, {k,
1., 7.}]

            {0.698539, 0.706226, 0.707018, 0.707098, 0.707106, 0.707107,
0.707107}

???

Who ordered this? ;-)

0.707107, 0.707107, 0.707107 ...

I feel, I have seen this number elsewhere....

Omigosh!

Compare!

            N[1/Sqrt[2]]

            0.707107

Now you can see clearly that the value of the limit DEPENDS ON THE WAY
OF
OUT APPROACHING IT.

In such a case, we say, THE LIMIT DOES NOT EXIST.

ALL WE CAN SAY ABOUT IT IS THAT ITS VALUE CANNOT BE GREATER THAN YOUR
1 AND LESS THAN YOUR -1, THAT IS IT IS EQUAL TO  Interval[{-1, 1}]

Yesterday, I gave you the wrong number (I tried to calculate it in
mind using the Stirling formula, but unfortunately had a glitch 8-(

My main goal, yesterday, was to show you that your limit does not exist,
and NLimit written by an outstanding calculator, Jerry Keiper, reports
not what it should report (Jerry Keiper made a *PHENOMENAL* mountain of
work designing and implementing the numerical components of Mathematica
which we are happy to use. There is not the slightest doubt that he
perfectly realized the drawback of his NLimit - but he had a Mont Blanc
of tasks to do... If he were alive, he had fixed NLimit.), and it was
relatively unimportant for me HOW EXACTLY YOUR LIMIT DOES NOT EXIST ;-)

AS I HAVE WRITTEN YOU:

The simplest way to see it might be to look at this sequence

Table[Plot[Binomial[-1/2, n]*Sqrt[n*Pi], {n, 10^k, 2 10^k}], {k, 1, 4}]


By the way, absence of interval concept makes the difference
between the Calculus`Limit` and NumericalMath`NLimit` packages.
The former uses the notion of interval (but, alas, not always can
apply it successfully, as in the following example)

Limit[Sin[z], z -> Infinity]

   Interval[{-1, 1}]

<< Calculus`Limit`
Limit[Sin[z], z -> Infinity]

   Indeterminate


Andrzej Kozlowski has written you on Sun, 12 May 2002 03:25:48:
   
AK> I don't think Mathematica can do solve this problem without a lot of
AK> human human help.

My idea is, he is right.

   
Thank you for your letter.


Regards,

Vladimir Bondarenko

........................................................................
..................

Dear Sir,
 
Empirically the limit goes to 1 for positive even integers, and -1 for
odd integers. 
 
Sqrt[n*Pi]*Binomial[-1/2, n]  /. n -> {10., 100., 1000., 10000.}
  
{0.9875829288261563, 0.9987507861261873, 0.9998750078180174,
0.999987500075049}
 
Sqrt[n*Pi]*Binomial[-1/2, n] /.   n -> {11., 101., 1001., 10001.}
  
{-0.988704545233999, -0.9987631468267192,   -0.9998751326761267,
-0.9999875013126677}
 
These appear to be the limits. Examining the graph you sent me I noticed
that all the peaks were 1 and all the 
lows were -1 confirming the experimental data. I also received an email
with a very simple algebraic proof 
confirming the value of the limit to be 1.
 
James







  • Prev by Date: Re: Tough Limit
  • Next by Date: ParametricPlot3D without black lines
  • Previous by thread: Re: Tough Limit
  • Next by thread: combining surface graphics objects