>
 

MATH 392 -- Seminar in Computational Commutative Algebra 

Another "black box" Gr"obner basis calculation. 

 

We saw in the lab last Friday that lex Gr"obner bases 

apparently can eliminate variables and produce elements 

of a polynomial ideal that contain only some of the  

variables present in the original polynomials (if there 

are such).  One place where this might be useful is when 

we want to find implicit equations of parametrically defined 

curves or surfaces.  Here is one such example, which is  

even a case where the parametrization involves trig functions: 

 

    x = sin(t) cos^3(t) 

    y = sin^2(t) cos(t) 

 

in the plane.   

>
 

> plot([2*sin(t)*cos(t)^3,sin(t)^2*cos(t),t=0..2*Pi]);
 

Plot 

We introduce variables  s  for sin(t),  c for cos(t), 

and add the algebraic relation  s^2 + c^2  -  1 = 0  for all t. 

Let's see what happens if we compute a lex Gr"obner basis 

for the ideal  

 

   < x - sc^3,  y - s^2c, s^2 + c^2 - 1> 

 

(lex order with   s > c > x > y  to try to eliminate s, c ) 

 

> with(Groebner);
 

[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, InterReduce, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MonomialOrder, MultiplicationMatrix, Norma...
[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, InterReduce, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MonomialOrder, MultiplicationMatrix, Norma...
[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, InterReduce, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MonomialOrder, MultiplicationMatrix, Norma...
[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, InterReduce, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MonomialOrder, MultiplicationMatrix, Norma...
[Basis, FGLM, HilbertDimension, HilbertPolynomial, HilbertSeries, InterReduce, IsProper, IsZeroDimensional, LeadingCoefficient, LeadingMonomial, LeadingTerm, MonomialOrder, MultiplicationMatrix, Norma...
 

> Id:=[x-s*c^3,y-s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c*x^2-2*c*y^2+y^3, c^2*x^2-c*y^3...
[y^8+x^6+5*x^4*y^2+5*x^2*y^4-x^2*y^2, y^5*c+c*y^3+x^4+3*x^2*y^2-c*y+x^2+y^2, -y^4+2*c*y^3+c*x^2*y+x^2-c*y+y^2, c*x^4-5*c*y^4-y^3*x^2+2*y^5+3*c*y^2-4*y*x^2-3*y^3, c^2*y-c*x^2-2*c*y^2+y^3, c^2*x^2-c*y^3...
 

>
 

Note that the first element of the Gr"obner basis does contain only x,y 

terms, as we hoped!   The variety defined by that polynomial also looks 

right! 

> with(plots):
 

> implicitplot(B[1],x=-1..1,y=-1..1,grid=[200,200]);
 

Plot 

>