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: [mg2287] Re: [mg2268] Re: Bug in interpretation of mma Series[] command?
  • From: Richard Mercer <richard at seuss.math.wright.edu>
  • Date: Mon, 23 Oct 1995 12:40:00 -0400

In view of Dave Withoff's response to this issue, perhaps I was a  
little hasty in my reply.

His reply was cogent as always and from a system design viewpoint is  
definitely the right approach.

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.
(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.

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.

One possible way to do this, though far from perfect, is to use

$Post = (# /.  
Literal[SeriesData[stuff__]]:>Normal[SeriesData[stuff]])&;

(You could put this in your init.m file if you really like it.)
Two problems with this:
(1) It can potentially corrupt some things you don't want converted.
(For example, its own output! Try removing the semicolon.)
(2) More importantly, it's an expert solution to a non-expert problem.
The people who can/will do things like this are pretty much the people  
for whom it's not necessary.

Richard Mercer


  • Prev by Date: Re: Spherical Trigonometry Application
  • Next by Date: Using Hold, ReleaseHold, and Unevaluated
  • Previous by thread: Re: Bug in interpretation of mma Series[] command?
  • Next by thread: Re: Re: Bug in interpretation of mma Series[] command?