MathGroup Archive 2006

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

Search the Archive

Re: FindInstance returning incorrect results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71388] Re: [mg71344] FindInstance returning incorrect results
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 16 Nov 2006 00:53:49 -0500 (EST)
  • References: <200611151144.GAA01342@smc.vnet.net>

You are using FindInstance correctly and it seems you have found a  
bug. Besides your another thing that suggest that something is wrong  
is this:

In[59]:=
FindInstance[c*c == -1 && c*d == I && c != 0, {c, d}]

 From In[59]:=
"TriangularSet in Reduce.m is incorrect"

Out[59]=
{{c -> -I, d -> -1}}


This is with

In[60]:=
$Version

Out[60]=
5.1 for Mac OS X (October 25, 2004)

Andrzej Kozlowski



On 15 Nov 2006, at 20:44, Jason Grout wrote:

> I ran into the following problem with FindInstance today.  Is this a
> known problem?  Am I using FindInstance correctly?  A simple example
> where the problem comes up is in finding values c and d such that  
> c^2=-1
> and c*d=I.
>
> First, let's make sure a solution exists:
>
> Clear[c,d]; Solve[{c*c== -1, c*d== I},{c,d}]
>
> gives
>
> {{c -> -I, d -> -1}, {c -> I, d -> 1}}, which is correct.
>
> FindInstance[c*c== -1 && c*d == I, {c,d}] gives the _incorrect_ answer
> {{c -> 0, d -> 0}}.
>
> FindInstance[c*c == -1 && c*d == I, {c,d}, Complexes]
>   also gives {{ c -> 0, d -> 0}}, which again is an incorrect answer.
>
> However, if I ask for more than one solution, FindInstance gives  
> correct
> answers.  For example:
>
> FindInstance[c*c == -1 && c*d == I, {c,d}, 2] gives the answers that
> Solve gave above.
>
> Am I using FindInstance incorrectly?  It seems odd that I get correct
> answers only when I ask for more than one answer.  The documentation
> mentions that FindInstance uses a faster method for generating an
> example if only one example is needed--is that causing a problem here?
> Can I be sure that if I ask for more than one answer, I'll get correct
> answers?  On a related note, if FindInstance returns {}, does that  
> mean
> a solution does not exist, or merely that FindInstance couldn't find a
> solution?
>
> Thanks,
>
> Jason Grout
>
> --
> Jason Grout
> jason-mathematica at creativetrax.com
>


  • Prev by Date: Re: Assumptions for Trigonometry Inequalities
  • Next by Date: Re: About NIntegrate
  • Previous by thread: FindInstance returning incorrect results
  • Next by thread: Re: FindInstance returning incorrect results