MathGroup Archive 1999

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

Search the Archive

Re(2): Re: Bug in Solve?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17522] Re(2): [mg17458] Re: [mg17395] Bug in Solve?
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Mon, 10 May 1999 19:53:23 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks. I would like to ask you a purely mathematical question. Suppose
we have a finitely generated algebra of characteristic zero and we
consider some element of its algebraic closure explicitely given in terms
the generators using radicals and powers . Can we check that this is in
fact the zero element?  In other words I am trying to express the
folowing problem in abstract terms:  we are given an expression in
several variables involving radicals and powers. Is there an algebraic
algorithm that would check if this expression is identically 0? (I mean
without substituting numerical values for the "variables" and doing
approaximate computations). I would be very surprised if there was though
I can't remember any theorems saying that this is undecidable in general.
 If there isn't then the only approach would be seem to be to substitute 
numerical values for the parameters and perform numerical checks. I guess
something like this could (in principle) be implemented, couldn't it?

On the other hand, one thing Mathematica could definitely do in such
cases, is to issue a warning. This is why I thought this behaviour might
be called "a bug": Mathematica making any false statements without a
suitable warning should probably be considered a bug.


On Mon, May 10, 1999, Daniel Lichtblau <danl at wolfram.com> wrote:

>Andrzej Kozlowski wrote:
>> 
>> I do not know whether to call this a bug, but if it is one  it is quite
>> understandable why it occurs. The problem is that Mathematica, just like my
>> students, does not check its solutions. This is how a careless student (and
>> also Mathematica) would arrive at this wrong answer:
>> 
>> First, you re-write your equation as
>> 
>> Sqrt[1+a^2]*Sqrt[1+b^2]==-(1+a*b)
>> 
>> You now square both sides to get
>> 
>> (1+a^2)*(1;b^2)==(1+a*b)^2
>> 
>> Now, Solve quite correctly will give:
>> 
>> In[78]:=
>> Solve[(1+a^2)*(1+b^2)==(1+a*b)^2,a]
>> Out[78]=
>> {{a -> b}, {a -> b}}
>> 
>> This is fine, the only problem is that these are not solutions of the
>> original equation, which has no solutions. The only way to check this is to
>> substitute these solutions back into the original equation to check if it
>> works. But Mathematica does not do this in this case.
>
>I wish it were that simple. The problem is that I do not know how to
>make the check correct in all cases where the result involves parameters
>rather than just numeric objects. The verifier does a basic sanity check
>but cannot weed out the solution in this case even though it is in fact
>a parasite for generic parameter values. Our strategem is to return all
>solutions that cannot be discarded on obvious grounds. (Why? Because
>quite often we obtain solutions that are neither generically correct nor
>generically incorrect, due to parametrized algebraics. So we return all
>of them).
>
>
>> Actually, it does do chcking in some cases. Solve  takes the option
>> VerifySolutions which is by default set to Automatic (same as True), but it
>> only works in case of numerical solutions, not solutions containing
symbols.
>> Compare what hapens if we use a value for b, for example b=1.
>> 
>> Solve[{1 + x*1 + Sqrt[1 + 1^2]*Sqrt[1 + x^2] == 0}, x, VerifySolutions ->
>> False]
>> Out[2]=
>> {{x -> 1}}
>> 
>> Same as before and just as wrong. But
>> 
>> In[3]:=
>> Solve[{1 + x*1 + Sqrt[1 + 1^2]*Sqrt[1 + x^2] == 0}, x]
>> Out[3]=
>> {}
>> 
>> This time Mathematica checked its solution and noticed that it is wrong. In
>> general there is a good reason why Mathematica does not try to verify
>> solutiuons containing symbols. It will probably be unable to do so in most
>> casess. 
>
>This is basically correct. Though for some examples, this one included,
>we might be able to do better than at present. I plan to look into this
>soon.
>
>
>> The transformations needed to do this are usually very complicated.
>> Its usually easier to do the insection by hand or substitute a few numbers.
>> 
>> --
>> Andrzej Kozlowski
>> Toyama International University
>> JAPAN
>> http://sigma.tuins.ac.jp
>> http://eri2.tuins.ac.jp
>> 
>> ----------
>> >From: iaz at cs.umd.edu (Ilya Zavorine)
To: mathgroup at smc.vnet.net
>> To: mathgroup at smc.vnet.net
>> >To: mathgroup at smc.vnet.net
>> >Subject: [mg17522] [mg17458] [mg17395] Bug in Solve?
>> >Date: Thu, May 6, 1999, 3:44 PM
>> >
>> 
>> > I executed the following statement:
>> >
>> > Solve[1+a*b+Sqrt[1+a^2]*Sqrt[1+b^2]== 0,a]
>> >
>> > and got as the answer
>> >
>> > {{a->b}}
>> >
>> > which is obviously wrong. Is this a Mathematica bug or
>> > am I doing something wrong?
>> >
>> > Thanks,
>> >
>> > Ilya
>
>The answer, as was pointed out by Andrzej and others, is that you did
>nothing wrong and Mathematica is not quite able to recognize that the
>solution is generically invalid. As I said, I'll give this some thought.
>
>
>Daniel Lichtblau
>Wolfram Research
>


Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/
http://eri2.tuins.ac.jp/



  • Prev by Date: Possible to zoom in/out of a graphics output?
  • Next by Date: Re: Math Link question about String transfer
  • Previous by thread: Possible to zoom in/out of a graphics output?
  • Next by thread: Export of postscript