MathGroup Archive 2002

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

Search the Archive

Re: Bug in Simplify?

  • To: mathgroup at
  • Subject: [mg33167] Re: Bug in Simplify?
  • From: "David W. Cantrell" <DWCantrell at>
  • Date: Wed, 6 Mar 2002 01:55:52 -0500 (EST)
  • References: <a61v7q$gpt$>
  • Sender: owner-wri-mathgroup at

adam.smith at (Adam Smith) wrote:
> I was recently working with some trig functions.  More specifically
> for quantum mechanics where one often has terms like Sin[n Pi].  I
> noticed what seemed a bug in Mathematica's Simplify[,Assumptions].
> In[1]:=
> Simplify[Sin[n*Pi]/n, Element[n,Integers]]
> Out[1]=
> 0

This is certainly not a bug. Note that 0/x simplifies to 0, period.
Of course, you might well argue that, when simplifying 0/x to 0, some
indication should be provided that that result is not valid if x = 0.
Are there computer algebra systems which standardly
provide such qualifications? Is it possible to specifically request
Mathematica to provide such qualifications? I don't know the answers to
these two questions. But stating fully the qualifications required for
all simplifications in a messy computation could easily overwhelm the
ordinary user. You might take a look at "Crimes and Misdemeanors in
the Computer Algebra Trade", David R. Stoutemyer, _Notices of the
American Mathematical Society_ 38:7 (1991) 778-785. Does anyone have
references to similar discussions by other authors? If so, I'd be quite
interested in reading them.

> Which is fine as long as n is not zero.
> In[2]:=
> Limit[Sin[n*Pi]/n, n -> 0]
> Out[2]=
> Pi
> It appears to me that Simplify is correctly determining that Sin[n
> Pi]=0 for n an integer, but it ignores the fact that there is an
> indeterminate 0/0.  I realize that this is a special case, but it
> seems to occur often enough that it should be handled properly

I'm not entirely sure what you think "handled properly" would be.
For me, in a system in which 0/0 is undefined,
Simplify[Sin[n*Pi]/n, Element[n,Integers]] should yield
0 if n is nonzero, undefined if n is 0.

> or at least provide a warning message that one should double check
> the results.
> Am I being picky or do others feel the same?

You're not being picky, at least IMO. But perhaps what you would like
is not practical.

  David Cantrell

-------------------- http://NewsReader.Com/ --------------------
                    Usenet Newsgroup Service

  • Prev by Date: RE: How to transform x axis on ListPlot?
  • Next by Date: RE: How to transform x axis on ListPlot?
  • Previous by thread: Bug in Simplify?
  • Next by thread: Re: Bug in Simplify?