MCS 563 Friday 27 August 2004 Illustration of Groebner basis computation in Maple 9
| > | restart; |
We use the example on page 26 of the textbook.
| > | p1 := x^2 + 4*x*y + 4*y^2 - 4; |
| > | p2 := 4*x^2 - 4*x*y + y^2 - 4; |
The polynomials in the system are products of linear polynomials:
| > | factor(p1); |
| > | factor(p2); |
| > | with(Groebner); |
![]()
![]()
| > | ?Groebner; |
| > | triangular_basis := gbasis([p1,p2],plex(x,y)); |
| > | total_degree_basis := gbasis([p1,p2],tdeg(x,y)); |
| > | ?SetBasis; |
| > | ns,rv := SetBasis(total_degree_basis,tdeg(x,y)); |
| > | My := MulMatrix(y,ns,rv,total_degree_basis,tdeg(x,y)); |
| > | y_values := LinearAlgebra[Eigenvalues](My); |
| > | seq(subs(y=y_values[k],triangular_basis),k=1..LinearAlgebra[Dimension](y_values)); |