MathGroup Archive 2008

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

Search the Archive

Re: How to remove duplicate solutions (Solve)?


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)?