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?

    Thanks.
     
  2. jcsd
  3. Sep 21, 2009 #2

    Dale

    Staff: Mentor

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

    Hepth

    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}] ]
    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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Selecting roots found by Solve[]
  1. Roots in Matlab (Replies: 4)

Loading...