Ask Your Question

System of nonlinear equations

asked 2011-07-13 16:40:44 -0500

Eviatar Bach gravatar image


Is it possible to solve the following using Sage?

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-07-13 19:53:09 -0500

benjaminfjones gravatar image

Yes, but not using solve.

Your system of equations defines a 0-dimensional subvariety of $\mathbb{C}^3$. Sage can tell you which points are in the zero set of the polynomials in your system like this:

sage: R.<x1,x2,x3> = PolynomialRing(QQ)
sage: R
Multivariate Polynomial Ring in x1, x2, x3 over Rational Field

sage: I=R.ideal([x1+x2+x3-6,x1*x2*x3-6,x1^2+x2^2+x3^2-14])
sage: I.dimension()
sage: I.variety()
[{x2: 2, x1: 3, x3: 1}, {x2: 3, x1: 2, x3: 1}, {x2: 1, x1: 3, x3: 2}, {x2: 3, x1: 1, x3: 2}, {x2: 1, x1: 2, x3: 3}, {x2: 2, x1: 1, x3: 3}]

The last line is a list of dictionaries. Each dictionary contains the coordinates of a point in the zero set of your system of polynomials.

edit flag offensive delete link more


Thanks! This is very helpful.

Eviatar Bach gravatar imageEviatar Bach ( 2011-07-14 16:39:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-07-13 16:40:44 -0500

Seen: 560 times

Last updated: Jul 13 '11