MathGroup Archive 2002

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

Search the Archive

Re: Bug in Simplify?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33339] Re: Bug in Simplify?
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Sat, 16 Mar 2002 01:40:19 -0500 (EST)
  • References: <a6pj7l$aoj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Gianluca Gorni <gorni at dimi.uniud.it> wrote:
> > As best I can tell, however, nothing that you said explains why
> > we should expect Simplify[x/y, x==0 && y==0] to yield 0. This
> > still puzzles me.
>
> It seems that Simplify will not look at denominators to see when
> they vanish. For example
>
> Simplify[x/y == 1 && y == 0]
>
> will return the argument unevaluated. Also Solve has the same problem:
> Solve[x/y == 1] will not warn you that x=y=0 is not a solution.
>
> A function that cares for vanishing denominators is Reduce:
>
> Reduce[x/y == 1 && y == 0] gives False
>
> Also, Reduce[x/y == 1] gives x == y && y != 0

Thanks for your response.

> I don't know how relevant it is, but 2 years ago Adam Strzebonski,
> in response to why Simplify[Sqrt[x^2], x == 1 + Sqrt[2]] did not
> return x, wrote:
>
> > I am not convinced that Simplify should be
> > optimized for assumptions of the form x==constant. I would
> > expect that in most cases what one really wants is
> > Simplify[expr/.x->constant]
> > rather than
> > Simplify[expr, x==constant].

However, just as we wish,

In[1]:= Simplify[Sqrt[x^2], x \[GreaterEqual]0]
Out[1]= x

Hmm. That gives me a baroque idea. First, note that, as we wish,

In[2]:= Simplify[x>=0 && x<=0 && y>=0 && y<=0]
Out[2]= x==0 && y==0

Then, if you want Simplify to leave x/y as is (rather than giving 0), even
though you have _in essence_ specified x==0 && y==0 in the assumptions, use

In[3]:= Simplify[x/y, x>=0 && x<=0 && y>=0 && y<=0]
Out[3]= x/y

Best Regards,
  David Cantrell

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


  • Prev by Date: RE: Variable number of parameters
  • Next by Date: help needed with mathematical calculation
  • Previous by thread: Re: Re: Re: Bug in Simplify?
  • Next by thread: How to transform x axis on ListPlot?