Re: positive root only using Solve[]
- To: mathgroup at smc.vnet.net
- Subject: [mg41804] Re: positive root only using Solve[]
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Fri, 6 Jun 2003 09:50:35 -0400 (EDT)
- References: <bbnaqt$2e2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Select[Solve[x^2 ==1, x], #[[1,2]]>0&]
{{x -> 1}}
Select[Solve[x^2 ==1, x], (x/.#)>0&]
{{x -> 1}}
Bob Hanlon
In article <bbnaqt$2e2$1 at smc.vnet.net>, "seferiad" <seferiad at pacbell.net>
wrote:
<< Subject: positive root only using Solve[]
From: "seferiad" <seferiad at pacbell.net>
To: mathgroup at smc.vnet.net
Date: Thu, 5 Jun 2003 11:50:53 +0000 (UTC)
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 -> 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
>><BR><BR>