Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Selecting roots found by Solve[]

  1. Sep 21, 2009 #1
    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?

  2. jcsd
  3. Sep 21, 2009 #2


    Staff: Mentor

    Yes, just substitute x and y back into f and g and see which are positive.
  4. Sep 22, 2009 #3


    User Avatar
    Gold Member

    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}] ]
    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;

    so that it asserts x,y>0
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook