MathGroup Archive 2008

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

Search the Archive

Re: How to remove duplicate solutions (Solve)?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91793] Re: How to remove duplicate solutions (Solve)?
  • From: "Curtis F. Osterhoudt" <cfo at lanl.gov>
  • Date: Mon, 8 Sep 2008 05:02:00 -0400 (EDT)
  • References: <200809080253.WAA16729@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

Hi, Peng,

   Either use Reduce instead of Solve, or you can use Union on the solutions.

         Regards,
                  C.O.

> Hi,
>
> Solve[(x - 1)^2 == 0, x]
>
> The above code would give me the solution
> {{x -> 1}, {x -> 1}}
>
> But one is a duplicate of the other. I'm wondering how to only produce
> the unique solutions.
>
> Thanks,
> Peng
>
>



  • Prev by Date: How to simplify ArcCos[x/Sqrt[x^2+y^2]] to Pi/2-ArcTan[x/Abs[y]]?
  • Next by Date: use vim to edit mathematica file
  • Previous by thread: How to remove duplicate solutions (Solve)?
  • Next by thread: Re: How to remove duplicate solutions (Solve)?