MathGroup Archive 1998

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

Search the Archive

Calculus`Limit` is buggy!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13185] Calculus`Limit` is buggy!
  • From: "Paul A. Rombouts" <paromb at worldonline.nl>
  • Date: Mon, 13 Jul 1998 07:42:34 -0400
  • Organization: World Online
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 7/4/98 8:01:56 PM, tobi.kamke at t-online.de wrote:

>I've a problem. I thought that Limit[Fibonacci[n]/Fibonacci[n-1], n ->
>Infinity] is GoldenRatio.
>
>Mathematica says 1.
>What's wrong?

Hi,

I use Mathematica 3.01 under Windows NT 4.0. I've tried to reproduce
your example, but I found out I needed to load the standard package
"Calculus`Limit`".

In[1]:= Limit[Fibonacci[n+1]/Fibonacci[n],n->Infinity]

              Fibonacci[1 + n]
Out[1]= Limit[----------------, n -> \[Infinity]]
                Fibonacci[n]

In[2]:= Needs["Calculus`Limit`"]

In[3]:= Limit[Fibonacci[n+1]/Fibonacci[n],n->Infinity]

Out[3]= 1

Well, I certainly found that last answer rather unsettling. I started
experimenting with some other limits and I got some very disturbing
results. I've summarised the results as follows:

In[4]:= f[a_, b_, n_] := a^n + b^n

In[5]:= lim[a_,b_]:=Module[{n},Limit[f[a,b,n+1]/f[a,b,n],n->Infinity]]

In[6]:= mylim[a_,b_]/;Abs[a]>Abs[b]:=a

In[7]:= mylim[a_,b_]/;Abs[a]<Abs[b]:=b

In[8]:= mylim[a_,a_]/;a!=0:=a

In[9]:= mylim[a_,b_]/;Abs[a]==Abs[b]:=Indeterminate

In[10]:= comp[args__]:={{args},lim[args],mylim[args]}

In[11]:= TableForm[Apply[comp, {{2, 3}, {(1 + Sqrt[5])/2, (1 -
Sqrt[5])/2},
         {1/2, 1/3}, {5/6, 7/6}, {3, -5}, {-3, 5}, {I + 1, 2}, {2, 2},
         {1/3, -1/3}, {1, I}, {5, 5*I}}, {1}], TableDepth->2]

Out[11]//TableForm=
       {2, 3}                       9                 3

        1 + Sqrt[5]  1 - Sqrt[5]    3 (1 + Sqrt[5])   1 + Sqrt[5]
       {-----------, -----------}   ---------------   -----------
             2            2                2               2

        1  1                                          1
       {-, -}                                         -
        2  3                        0                 2

        5  7                        7                 7
       {-, -}                       -                 -
        6  6                        6                 6

       {3, -5}                      0                 -5

       {-3, 5}                      15                5

       {1 + I, 2}                   ComplexInfinity   2

       {2, 2}                       2                 2

        1    1
       {-, -(-)}
        3    3                      0                 Indeterminate

       {1, I}                       Indeterminate     Indeterminate

       {5, 5 I}                     0                 Indeterminate


In case it isn't clear from the from the preceding: mylim[a,b] gives the
value I think Limit[(a^(n+1)+b^(n+1))/(a^n+b^n),n->Infinity] should
have. Conclusion: If you use the package Calculus`Limit` be sure to
check your results with alternative methods.

greetings,

Paul A. Rombouts <P.A.Rombouts at phys.uu.nl>




  • Prev by Date: Can it be done - easily?
  • Next by Date: Re: 3D table plot Pbs
  • Previous by thread: Re: Can it be done - easily?
  • Next by thread: Default format for new cells