       Re: Bug in Simplify?

• To: mathgroup at smc.vnet.net
• Subject: [mg33216] Re: Bug in Simplify?
• From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
• Date: Sat, 9 Mar 2002 03:19:41 -0500 (EST)
• References: <a61v7q\$gpt\$1@smc.vnet.net> <a64fu0\$n04\$1@smc.vnet.net> <a675en\$d0m\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```adam.smith at hillsdale.edu (Adam Smith) wrote:
> It might indeed be impractical to ask what I have said.  But searching
> through the help in Mathematica I found no warnings that using
> Assumptions might fail in cases where an indeterminate form results.
> I don't think that it is too much to ask that the user be given an
> explanation that Simplify with Assumptions can fail for some cases
> (like the one I mentioned) and advising the user to check the results.

Perhaps it's not "using Assumptions" that's failing to do what you want;
maybe it's something more basic. Your assumption (that n is an integer)
allows Mathematica to deduce that the numerator (Sin[n Pi]) must be 0.
Then, whether you or I like it or not, 0/n will yield 0 _without reference
to any assumption_. The "problem" occurs only when n = 0. Being a "rare"
occurrence, it is ignored.

If you really want some things to ruffle your feathers, try the following:

Simplify[0/x, x==0]
Simplify[x/y, x==0 && y==0]
Simplify[x/x, x==0]

The results are 0, 0, and 1, resp., which I consider as being closer to
"crimes" than "misdemeanors".

> The one thing that I would respectfully disagree with is the
> comparison of 0/x and Sin[n Pi]/n.  If I were applying
>
> Simplify[ Sin[n Pi]/x, Element[n,Integers]]
>
> and it returns zero, I could understand the claim that it correctly
> equals zero - Because I did not ask Simplify to put any conditions on
> x.

I must disagree. If you don't put any condition on the denominator,
then it certainly can be zero. And similarly, if you specify that the
denominator is an integer, then it certainly can be zero. No difference!
In a computer algebra system in which 0/0 is undefined, the _only_
time that simplifying 0/x to 0 is not a "misdemeanor" IMO is when the
denominator is _known_ somehow (possibly by assumption) to be
_nonzero_.

Regards,
David Cantrell

--