I am very new to sage (please bear with me!)  I am unable to get a
solution - there is a solution!)

var ('x1 x2 P')
A1 = 16.59158
B1 = 3643.31
C1 = 33.424
A2 = 14.25326
B2 = 2665.54
C2 = 53.424
T = 318.15
P1S = exp(A1 - B1/(T - C1))
P2S = exp(A2 - B2/(T - C2))
y1 = 0.25
y2 = 0.75
A = 2.771 - 0.00523*T
gamma1 = exp(A*x2*x2)
gamma2 = exp(A*x1*x1)
eq1 = x1 + x2 == 1.0
eq2 = x1*exp(A*x2*x2)*P1S == y1*P
eq3 = x2*exp(A*x1*x1)*P2S == y2*P
solns = solve([eq1,eq2,eq3],x1,x2,P,gamma1,gamma2,solution_dict=True)
[[soln[x1].n(), soln[x2].n(), soln[P].n()] for soln in solns]


---> 22 solns =
solve([eq1,eq2,eq3],x1,x2,P,gamma1,gamma2,solution_dict=True)
     23 [[soln[x1].n(), soln[x2].n(), soln[P].n()] for soln in solns]
     24

/usr/local/sage-2.10.3/local/lib/python2.5/site-packages/sage/calculus/
equations.py in solve(f, *args, **kwds)
   1215             s = m.solve(args)
   1216         except:
-> 1217             raise ValueError, "Unable to solve %s for %s"%(f,
args)
   1218         a = repr(s)
   1219         sol_list = string_to_list_of_solutions(a)

<type 'exceptions.ValueError'>: Unable to solve [x2 + x1 ==
1.00000000000000, 44.51090294986788*x1*e^(1.10707550000000*x2^2) ==
0.250000000000000*P, 65.64145748625486*e^(1.10707550000000*x1^2)*x2 ==
0.750000000000000*P] for (x1, x2, P, e^(1.10707550000000*x2^2),
e^(1.10707550000000*x1^2))

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to