I'm using SageMathCell to solve chemical equilibrium problems, so at least
one set of my solutions has to be real and positive.
Here's my code:
var('x, y, z')
xi=0
yi=0.150/2.0
zi=0.150/2.0
K=8.3e-4
eq1=K == y*z/ x
eq2=xi+yi==x+y
eq3=2*xi+2*zi==2*x+2*z
solve([eq1, eq2, eq3],[x, y, z])
And here are my solutions:
[[x == -1/200000*sqrt(2496889) + 15083/200000, y == 1/200000*sqrt(2496889)
- 83/200000, z == 1/200000*sqrt(2496889) - 83/200000], [x ==
1/200000*sqrt(2496889) + 15083/200000, y == -1/200000*sqrt(2496889) -
83/200000, z == -1/200000*sqrt(2496889) - 83/200000]]
------------------------------
Any thoughts? Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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/sage-support.
For more options, visit https://groups.google.com/d/optout.