PDA

View Full Version : selecting roots found by Solve[]


mt-squared
Sep21-09, 12:52 PM
Hi All,

I am using Solve[{f(x,y)==0,g(x,y)==0},{x,y}] to find "x,y" roots of "f" and "g" functions. I am only interested in positive "x" and "y" roots, ignoring all the other. Is there a way to use "Select" command to find all positive roots?

Thanks.

DaleSpam
Sep21-09, 11:22 PM
Yes, just substitute x and y back into f and g and see which are positive.

Hepth
Sep22-09, 01:23 AM
if this is mathematica 6 or above, try

$Assumptions= x>=0&&y>=0;
Refine[Solve[{f(x,y)==0,g(x,y)==0},{x,y}] ]
or
FullSimplify[Solve[{f(x,y)==0,g(x,y)==0},{x,y}] ]

Those two should apply the assumptions. Or maybe:

$Assumptions= x>=0&&y>=0;
Solve[{FullSimplify[f(x,y)==0],FullSimplify[g(x,y)==0]},{x,y}]

so that it asserts x,y>0