MathGroup Archive 2008

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

Search the Archive

Re: Is this a bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90845] Re: Is this a bug?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sat, 26 Jul 2008 04:20:49 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g6c982$brv$1@smc.vnet.net>

mailcwc at gmail.com wrote:

> I tried to solve the following equation with mathematica 6.03
> 
> Solve[{Abs[X+Y I]==5,X==3},{X,Y}]
> 
> and got the answer
> 
> {{X -> 3, Y -> -2 I}, {X -> 3, Y -> 8 I}}
> 
> Am I  suppose to get {{X -> 3, Y -> 4 I}, {X -> 3, Y -> -4 I}} ?

No. Mathematica is correct. Also, from the online help, "Solve gives 
generic solutions only. It discards solutions that are valid only when 
the parameters satisfy special conditions. Reduce gives the complete set 
of solutions." For instance,

     In[1]:=
     eqns = {Abs[x + y*I] == 5, x == 3};
     sols = Solve[eqns]
     eqns /. sols
     eqns /. {{x -> 3, y -> 4 I}, {x -> 3, y -> -4 I}}
     Reduce[eqns]

     Out[2]= {{x -> 3, y -> -2 I}, {x -> 3, y -> 8 I}}

     Out[3]= {{True, True}, {True, True}}

     Out[4]= {{False, True}, {False, True}}

     Out[5]=
                                                             2
     -2 <= Im[y] <= 8 && (Re[y] == -Sqrt[16 + 6 Im[y] - Im[y] ] ||

                                           2
         Re[y] == Sqrt[16 + 6 Im[y] - Im[y] ]) && x == 3

See

http://reference.wolfram.com/mathematica/ref/Solve.html

http://reference.wolfram.com/mathematica/ref/Reduce.html


Regards,
-- Jean-Marc


  • Prev by Date: Re: Listplot with colours
  • Next by Date: How do I set PlotRegion value permantly?
  • Previous by thread: Re: Is this a bug?
  • Next by thread: Cos[a x - b] displayed as Cos[b - a x]