MathGroup Archive 1993

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

Search the Archive

Strange Series BUg

  • To: mathgroup at yoda.physics.unc.edu (Mathematica User's Group)
  • Subject: Strange Series BUg
  • From: Keith Clay <clay at galileo.phys.washington.edu>
  • Date: Thu, 23 Sep 93 15:06:17 MDT

Here is a bug that calls into question not only the way in which Mma
deals with series, but the way in which Mma deals with constants
whether they are constants I invent like "z" or one that it is supposed
to know about like "Pi".

Here is is:

------------------------------------------------------------------------


DEFINE A SIMPLE FUNCTION AND ASK FOR THE SERIES.  KEEP YOUR EYES ON "d".

In[1]:= expr1 = E^( (a - b x) (c - d) )

         (c - d) (a - b x)
Out[1]= E

In[2]:= Series[expr1,{x,0,1}]

         a (c - d)              a (c - d)         2
Out[2]= E          - b (c - d) E          x + O[x]

NO PROBLEM.  IT SHOULDN'T MATTER IF WE LET d BE SOMETHING LIKE Log[z], RIGHT?

In[3]:= expr2 = expr1/.(d->Log[z])

         (a - b x) (c - Log[z])
Out[3]= E

In[4]:= Series[expr2,{x,0,1}]

Series::esss: Essential singularity encountered in 
                                               2
    Exp[a (c - Log[z]) - b (c + <<1>>) x + O[x] ].

                (a - b x) (c - Log[z])
Out[4]= Series[E                      , {x, 0, 1}]


SOMEHOW THE PRESENCE OF "z" BOTHERED IT.

NOW WE MAKE IT EASIER BY PUTTING A NUMBER LIKE "E" IN THE LOG TERM

In[5]:= expr3 = expr2/.z->E

         (-1 + c) (a - b x)
Out[5]= E

In[6]:= Series[expr3,{x,0,1}]

         a (-1 + c)               a (-1 + c)         2
Out[6]= E           - b (-1 + c) E           x + O[x]


IT IS EASY TO THINK ABOUT THE LOG OF "E" OR A REAL NUMBER.  NO PROBLEM, RIGHT?

In[7]:= expr4 = expr2/.z->1.1

         (-0.0953102 + c) (a - b x)
Out[7]= E

In[8]:= Series[expr4,{x,0,1}]

         a (-0.0953102 + c)                       a (-0.0953102 + c)         2
Out[8]= E                   - b (-0.0953102 + c) E                   x + O[x]

FOR SOME REASON HAVING A VARIABLE IN THE LOG FUNCTION THREW MMA OFF, BUT
AS LONG AS IT IS JUST A NUMBER, THERE IS NO PROBLEM RIGHT?  WRONG!!!

In[9]:= expr5 = expr2/.z->Pi

         (a - b x) (c - Log[Pi])
Out[9]= E

In[10]:= Series[expr5,{x,0,1}]

Series::esss: Essential singularity encountered in 
                                                2
    Exp[a (c - Log[Pi]) - b (c + <<1>>) x + O[x] ].

                 (a - b x) (c - Log[Pi])
Out[10]= Series[E                       , {x, 0, 1}]


This is scary.

------------------------------------------------------------------------

Keith Clay                                    Department of Physics, FM-15
(clay at galileo.phys.washington.edu)            University of Washington
( -or-  clay at phys.washington.edu )            Seattle, WA  98195
                                              





  • Prev by Date: EllipticTheta and "rules"
  • Next by Date: Re: Getting X11 graphics from Mma on NeXT
  • Previous by thread: EllipticTheta and "rules"
  • Next by thread: Upgrade problems?