The last element of that Groebner basis is a univariate polynomial in
x2, so it is relatively easy to analyze its solutions.  There is one
triple root at x2=0, and then four others which are presumably the
four you are thinking of.  Once you have a value for x2, you can
substitute it into the other Groebner basis equations to find x1.

Another option is to use the optional phcpack package, which will find
numerical solutions to multivariate polynomial systems.  This will
sometimes work for problems that are too hard for Groebner basis
techniques.  For example:

from sage.interfaces.phc import phc
R.<x1,x2> = PolynomialRing(QQ, 2)
f1 = 1/2*((x1^2 + 2*x1 - 4)*x2^2 + 2*(x1^2 + x1)*x2 + x1^2)
f2 = 1/2*((x1^2 + 2*x1 + 1)*x2^2 + 2*(x1^2 + x1)*x2 - 4*x1^2)
sol = phc.blackbox([f1,f2],R)
sol.classified_solution_dicts()['real']

gives a list of dictionaries of solutions:

[{x2: 0.236067977499790, x1: 0.236067977499790}, {x2:
-2.23606797749979,
x1: 2.23606797749979}, {x2: 2.23606797749979, x1: -2.23606797749979},
{x2: -4.23606797749979, x1: -4.23606797749979}, {x2:
-6.37720238585100e-96, x1: 2.10843958864611e-81}, {x2:
1.74905606516859e-162, x1: -1.31179204887644e-162}, {x2:
3.60329031262762e-84, x1: 2.57377879473401e-84}, {x2:
5.06025501275065e-80, x1: 1.18072616964182e-79}]

In this case, they were all real, so I just selected that list.

Hope that helps,
Marshall Hampton

On Jul 16, 10:11 am, Doug <mcke...@gmail.com> wrote:
> I confess I'm not a mathematician (I'm an economist) and it's been
> almost 25 years since I took a basic course in abstract algebra.  But
> this is interesting.  From the wikipedia page on Grobner bases, it
> seems I should be able to compute solutions to the system based on the
> Grobner basis, but I can't figure out how.  I don't suppose sage has a
> function that maps these bases to solutions?
>
> Also, the fact that there are three bases (each corresponding to a
> solution?) makes me worry a bit since I know there are at least four
> solutions.  The fact that there are three also makes me think this
> might be the method that Maxima is using behind the scenes since it
> found 3 solutions.  And for the record, my fourth solution (x1 and x2
> both equal to sqrt(5) - 2) does satisfy the Grobner bases.
>
> On Jul 16, 10:46 am, David Joyner <wdjoy...@gmail.com> wrote:
>
> > Does this help any?
>
> > sage: R = PolynomialRing(QQ, 2, 'x1,x2', order='lp')
> > sage: x1,x2 = R.gens()
> > sage: f1 = 1/2*((x1^2 + 2*x1 - 4)*x2^2 + 2*(x1^2 + x1)*x2 + x1^2)
> > sage: f2 = 1/2*((x1^2 + 2*x1 + 1)*x2^2 + 2*(x1^2 + x1)*x2 - 4*x1^2)
> > sage: I = (f1,f2)*R; I
> > Ideal (1/2*x1^2*x2^2 + x1^2*x2 + 1/2*x1^2 + x1*x2^2 + x1*x2 - 2*x2^2,
> > 1/2*x1^2*x2^2 + x1^2*x2 - 2*x1^2 + x1*x2^2+ x1*x2 + 1/2*x2^2) of
> > Multivariate Polynomial Ring in x1, x2 over Rational Field
> > sage: B = I.groebner_basis(); B
> > [x1^2 - x2^2, x1*x2 - 1/8*x2^6 - 3/8*x2^5 + 9/8*x2^4 + 15/8*x2^3 -
> > 3/2*x2^2, x2^7 + 4*x2^6 - 6*x2^5 - 20*x2^4 + 5*x2^3]
>
> > Readhttp://www.sagemath.org/doc/constructions/polynomials.html#gr-bner-bases
> > for more examples.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to