MathGroup Archive 1995

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

Search the Archive

Re: Re: Bug in interpretation of mma Series[] command?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2326] Re: [mg2268] Re: Bug in interpretation of mma Series[] command?
  • From: Paul Abbott <paul at earwax.pd.uwa.edu.au>
  • Date: Tue, 24 Oct 1995 02:14:50 -0400
  • Organization: Dept of Physics, University of WA

Richard Mercer <richard at seuss.math.wright.edu> wrote:

>From the viewpoint of most users, I think the ideal situation would be  
>for
>
>Exp[-a y^2] * Series[1/(1 + y^2), {y,0,5}]
>
>to act like 
>
>
>Exp[-a y^2] * Normal[Series[1/(1 + y^2), {y,0,5}]]
>
>Reasons:
>(1) Most average (nonexpert) users do not have a mental model  
>corresponding to a SeriesData object; they think of the result of a  
>Series command as being a polynomial and expect it to behave that way  
>in calculations.

When you compute a series, say,

f[x] + O[x]^3

                         2
                 f''[0] x        3
f[0] + f'[0] x + --------- + O[x]
                     2

then you expect to be able to do operations on this series, e.g.

1/% // Simplify

                       2
 1     f'[0] x    f'[0]    f''[0]    2       3
---- - ------- + (------ - -------) x  + O[x]
f[0]        2         3          2
        f[0]      f[0]     2 f[0]

If you think of the result of a Series command as being a polynomial you 
lose this functionality.

Also, the fact that the syntax f[x] + O[x]^3 coerces Taylor series 
expansion of f[x] is elegant and useful.  It also means that if you 
write:

Exp[-a y^2] 1/(1 + y^2) + O[y]^6

you get

                            2
              2            a    4       6
1 + (-1 - a) y  + (1 + a + --) y  + O[y]
                           2

>(2) The structure Series[Exp[-a y^2] * 1/(1 + y^2), {y,0,5}] is  
>available and much more natural if you want the exponential converted  
>to a series.

So is the syntax

	Exp[-a y^2]	Normal[1/(1 + y^2) + O[y]^6]

>The best solution would seem to be a user-settable "switch" that would  
>apply Normal to the output of all Series commands. This would  
>presumably satisfy all those who expect Series objects to act like  
>polynomials in this and other situations.

You do have a user-settable "switch".  It is Normal and you can use this 
to turn a Series into a polynomial whenever you need this behaviour.  

Here is an example that demonstrates what a nice design feature this 
syntax is. Suppose that you want to factor off some (exponential) 
asymptotic behaviour.  You can use the syntax:

Exp[a r] Normal[Exp[-a r] f[r] + O[r]^2]

 a r
E    (f[0] + r (-(a f[0]) + f'[0]))

Cheers,
	Paul 





  • Prev by Date: Re: Using NIntegrate[] within FindRoot[] ??
  • Next by Date: Re: TCP/IP and local kernel
  • Previous by thread: Re: Re: Bug in interpretation of mma Series[] command?
  • Next by thread: Re: Re: Re: Bug in interpretation of mma Series[] command?