Hello,

I'm trying to use Python to solve (symbolically, for x, y and a0) the
following set of three simultaneous equations:
lam+2*y-a0*(1 - x/2)*x-0.005*x/2*x==0
a0*(1 - x/2)*x-1*y-0.743436700916726*y==0
x+y-conc==0

I don't see any reason it should be mathematically difficult - just
complicated and tedious - and Mathematica can do it without any
trouble. But when I give it to Python it just starts working and
doesn't finish. Do you have any idea why?

>>> from sympy import *
>>> lam=Symbol('lam')
>>> a0=Symbol('a0')
>>> conc=Symbol('conc')
>>> x=Symbol('x')
>>> y=Symbol('y')

# this works ok:
>>> solve([lam+2*y-a0*(1 - x/2)*x-0.005*x/2*x], [x])
[(-(-4*(-4*y - 2*lam)/(0.005 - a0) + 4*a0**2/(0.005 - a0)**2)**(1/2)/2
- a0/(0.005 - a0),), ((-4*(-4*y - 2*lam)/(0.005 - a0) + 4*a0**2/(0.005
- a0)**2)**(1/2)/2 - a0/(0.005 - a0),)]

# but this doesn't
>>> solve([lam+2*y-a0*(1 - x/2)*x-0.005*x/2*x, a0*(1 - 
>>> x/2)*x-1*y-0.743436700916726*y, x+y-conc], [x, y,a0])

If you have any ideas I would be very grateful!
Thanks.
Jo

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to