Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

solving simultaneous equations with solve()

I am trying to solve a set of (fairly simple) nonlinear simultaneous algebraic equations with real solutions as shown below. I know the equations have real solutions (they are in the comment line), but I cannot get sage to produce them. If I remove the 'sympy' and 'real' it produces complex solutions. Is there a better method for solving equations like these?

x,y,z=var('x y z')
#solutions are x=2.215, y=0.6018
print 'second problem:',' x=',s[0][x],' y=',s[0][y]