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: [mg91800] Re: How to remove duplicate solutions (Solve)?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 8 Sep 2008 05:03:16 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Solve[(x - 1)^2 == 0, x] // Union

{{x -> 1}}


Bob Hanlon

---- Peng Yu <PengYu.UT at gmail.com> wrote: 

=============
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


--

Bob Hanlon



  • Prev by Date: How to always output result in InputForm from the command line
  • Next by Date: Comparison of coefficients
  • Previous by thread: Re: How to remove duplicate solutions (Solve)?
  • Next by thread: Re: How to remove duplicate solutions (Solve)?