MathGroup Archive 1995

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

Search the Archive

Bug in interpretation of mma Series[] command?

  • Subject: [mg2231] Bug in interpretation of mma Series[] command?
  • From: siegman at ee.stanford.edu (A. E. Siegman)
  • Date: Wed, 18 Oct 1995 05:52:42 GMT
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Stanford University
  • Sender: daemon at wri.com ( )

Does the following make sense to anyone?

   In[6]:=
   f[y] = Exp[-a y^2] * Series[1/(1 + y^2), {y,0,5}]
   
   Out[6]=
                               2
                 2            a    4       6
   1 + (-1 - a) y  + (1 + a + --) y  + O[y]
                              2

This strikes me as a really counter-intuitive, perverse,
guaranteed-to-cause-trouble "gotcha".  

I have to agree that 

   In[7]:=
   f[y] = Exp[-a y^2] * Normal[Series[1/(1 + y^2), {y,0,5}]]

   Out[7]=
        2    4
   1 - y  + y
   -----------
          2
       a y
      E

does what's expected; but the first case should surely
either generate an error msg, or not be interpreted at
all.  There's no way any sensible interpretation of
the input command (by normal users, that is) should lead
to series expansion of the Exp[] function also.


  • Prev by Date: Re: Replacing a part of a list/matrix?
  • Next by Date: simultaneous equations
  • Previous by thread: Re: color in ListContourPlot
  • Next by thread: Bug in interpretation of mma Series[] command?