Ask Your Question
1

determine consistency of nonlinear system of equations

asked 2011-12-08 14:32:48 +0100

shacsmuggler gravatar image

Hello,

I need to be able to determine the consistency of very large systems of polynomial equations, with 30-40 variables and as many equations. When I put such systems into solve, I get the same system back again. Here are some equations typical of those in the systems I am dealing with:

2*a0*b0 == 0,

2*a0*b5 + 2*a1*b4 + 2*a4*b1 + 2*a5*b0 - 4*a8*b8 == 0,

2*a0*b10 + 2*a1*b9 + 2*a10*b0 + 2*a2*b8 + 2*a8*b2 + 2*a9*b1 == 0,

3*b0^2*c6 + 6*b0*b1*c5 + 6*b0*b2*c4 + 6*b0*b4*c2 + 6*b0*b5*c1 + 6*b0*b6*c0 - 12*b0*b8*c9 - 12*b0*b9*c8 + 3*b1^2*c4 + 6*b1*b4*c1 + 6*b1*b5*c0 - 12*b1*b8*c8 + 6*b2*b4*c0 - 6*b8^2*c1 - 12*b8*b9*c0 + 2*a0*a6 + 2*a1*a5 + 2*a2*a4 - 4*a8*a9 == 0

This is not a complete system - just a few equations to show the lengths of equations that tend to come up. Again, I don't care what any solutions are; I just need to know if any exist. Is there a way to do this in sage?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2011-12-09 06:37:41 +0100

Volker Braun gravatar image

A good way of thinking about a system of polynomial equations is that the common zero set of polynomials defines an algebraic variety. You want to know its dimension (which might be -1 for the empty set).

sage: R.<x,y> = QQ[]
sage: R.ideal([x*y]).dimension()   # solution is x=0 and y=0 plane intersecting at origin
1
sage: R.ideal([x*y,y-1]).dimension()   # only solution x=0, y=1
0
sage: R.ideal([x*y,y-1,x-1]).dimension()  # inconsistent
-1
edit flag offensive delete link more

Comments

But be warned that computing the (Krull) dimension of an ideal requires a Gröbner basis computation (that's done internally), which, depending on the problem, might be very very difficult. My experience is that it is always worth trying, but the OP shouldn't be too disappointed if it doesn't work.

Simon King gravatar imageSimon King ( 2011-12-09 17:02:30 +0100 )edit

Just a comment for completeness: the groebner basis aproach is the right way to go... if we care about solutions in a field that is algebraically closed. If we are trying to discuss if a system of equations has real solutions, its a much harder problem.

mmarco gravatar imagemmarco ( 2011-12-10 20:31:35 +0100 )edit

Great answer! Thanks.

shacsmuggler gravatar imageshacsmuggler ( 2011-12-19 19:48:59 +0100 )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

Stats

Asked: 2011-12-08 14:32:48 +0100

Seen: 848 times

Last updated: Dec 09 '11