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: [mg91795] Re: How to remove duplicate solutions (Solve)?
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Mon, 8 Sep 2008 05:02:21 -0400 (EDT)
  • References: <ga24hv$gia$1@smc.vnet.net>

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.

would that be what you want?

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


  • Prev by Date: Re: LU Decomposition w/o Pivoting
  • Next by Date: How to always output result in InputForm from the command line
  • Previous by thread: Re: How to remove duplicate solutions (Solve)?
  • Next by thread: Re: How to remove duplicate solutions (Solve)?