Selecting roots found by Solve[]

  • Thread starter Thread starter mt-squared
  • Start date Start date
  • Tags Tags
    Roots
Click For Summary
SUMMARY

The discussion focuses on using the Solve function in Mathematica to find positive roots of two equations, f(x,y) and g(x,y). Users are advised to set assumptions for x and y to be non-negative using the $Assumptions variable. The recommended methods include using Refine and FullSimplify to filter the solutions based on these assumptions. Specifically, the commands provided are applicable for Mathematica version 6 and above.

PREREQUISITES
  • Familiarity with Mathematica 6 or higher
  • Understanding of the Solve function in Mathematica
  • Knowledge of mathematical functions and equations
  • Basic concepts of assumptions in symbolic computation
NEXT STEPS
  • Explore the use of the Refine function in Mathematica for filtering solutions
  • Learn about the FullSimplify function and its applications in solving equations
  • Investigate the implications of using $Assumptions in Mathematica
  • Study advanced techniques for solving systems of equations in Mathematica
USEFUL FOR

Mathematica users, mathematicians, and students working on solving systems of equations, particularly those interested in filtering solutions based on specific conditions.

mt-squared
Messages
1
Reaction score
0
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.
 
Physics news on Phys.org
Yes, just substitute x and y back into f and g and see which are positive.
 
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
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 16 ·
Replies
16
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
984
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K