MathGroup Archive 2003

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

Search the Archive

Re: positive root only using Solve[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41815] Re: [mg41791] positive root only using Solve[]
  • From: Bobby Treat <drmajorbob-MathGroup3528 at mailblocks.com>
  • Date: Fri, 6 Jun 2003 09:50:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Solve[x^2 == 1, x]
Cases[%, Rule[a_, b_?Positive] :> Rule[a, b], 2]

or

Solve[x^2 == 1, x]
x /. %
Select[%, Positive]

Bobby

-----Original Message-----
From: seferiad <seferiad at pacbell.net>
To: mathgroup at smc.vnet.net
Subject: [mg41815] [mg41791] positive root only using  Solve[]

Hello, Consider the following equation. Solve[x^2 ==1, x] Mathematica 
will output 1 and -1 for x. However, I only want Mathematica to output 
the positive solution (i.e., x -&gt; 1), so I can use this conveniently 
in a subsequent equation. Is there a way to force the output to produce 
only the positive solution? Thanks, Jay 


  • Prev by Date: Re: Re: Big problem in solving radicals.
  • Next by Date: Re: positive root only using Solve[]
  • Previous by thread: positive root only using Solve[]
  • Next by thread: Re: positive root only using Solve[]