Re: Bug in interpretation of mma Series[] command?
- To: mathgroup at smc.vnet.net
- Subject: [mg2299] Re: Bug in interpretation of mma Series[] command?
- From: Paul Abbott <paul at earwax.pd.uwa.edu.au>
- Date: Mon, 23 Oct 1995 12:42:06 -0400
- Organization: Dept of Physics, University of WA
siegman at ee.stanford.edu (A. E. Siegman) wrote:
>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".
Totally disagree! The fact that the presence of an O[y] term
AUTOMATICALLY coerces the result into a series is a beautiful and useful
syntax. For example, see what happens when you enter
f[x] + O[x]^5
>... but the first case should surely
>either generate an error msg, or not be interpreted at
>all.
Why?
>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.
Yes there is -- whenever you have performed a Series expansion the
result is a special (SeriesData) object. Any further manipulutations of
this object (including muliplying by an arbitrary function) works as
expected. E.g.,
f[x]+O[x]^3
1/%
I take advantage of this syntax all the time.
Cheers,
Paul