Hi guys,

I want to calculate the steady states of a system of differential equations:

    
    from sympy import *

    X,Y,Z = symbols("X,Y,Z")
    variables_dimless = [X,Y,Z]
    Rxy,Rxz, Ry,Ryx,Ryz, Rz,Rzy,Rzz = symbols("Rxy,Rxz,  Ry,Ryx,Ryz, 
 Rz,Rzy,Rzz",positive=True)
    dimensionless_DES_list = [X*(1-X),
                              Ry *(Y* (1 - Y) + Rzy * Z *Y ),
                              Rz *(Z*(1-Z)+Rxz*X*Z+Ryz*Y*Z)]
    equilibria = solve( dimensionless_DES_list,(variables_dimless)) 

     Out[2]: 
     [(0, 0, 0),
      (0, 0, 1),
      (0, 1, 0),
      (0, -(Rzy + 1)/(Ryz*Rzy - 1), -(Ryz + 1)/(Ryz*Rzy - 1)),
      (1, 0, 0),
      (1, 0, Rxz + 1),
      (1, 1, 0),
      (1, -(Rxz*Rzy + Rzy + 1)/(Ryz*Rzy - 1), -(Rxz + Ryz + 1)/(Ryz*Rzy - 1
))]




My problem are the negative signs of the results for example solution 4: 

    (0, -(Rzy + 1)/(Ryz*Rzy - 1), -(Ryz + 1)/(Ryz*Rzy - 1)),


For future calculation it is important that all solutions of the variables 
have a positive sign. The solution should look like:

    (0, (Rzy + 1)/(1 - Ryz*Rzy), (Ryz + 1)/(1 - Ryz*Rzy )),



I do not know how to manipulate the output. If I define the variables as 
following

    X,Y,Z = symbols("X,Y,Z",positive=True)



The solver just finds the one solution were X,Y,Z are positive.

Do you have any ideas?

Thank you in advance

Alex

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/5e411656-f975-49c8-ae62-4e44ff9d84e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to