MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: elimination using GroebnerBasis

  • To: mathgroup at
  • Subject: [mg49392] Re: [mg49352] elimination using GroebnerBasis
  • From: Daniel Lichtblau <danl at>
  • Date: Sat, 17 Jul 2004 06:39:07 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Gareth Owen wrote:
> Am I right in thinking that
> GroebnerBasis[{poly1, poly2, poly3},{x,y,z},{z}] 
> will give a polynomial that is the result of eliminating x and y from the 3
> polynomials together?

Almost. There are two problems. First is that your ordering of lists is 
reversed and you want to put the elimination variables in the third 
list. Second is that you do not want overlaps in the two lists. So you 
could do:

GroebnerBasis[{poly1,poly2,poly3}, {z}, {x,y}]


{poly1, poly2, poly3} =
   {4*x^2+x*y+z, 5*y^2+x*y-3*x-4,z^2+2*z*y^2+3*x*z-7-y};

InputForm[GroebnerBasis[{poly1,poly2,poly3}, {z}, {x,y}]]
{81872520 - 83748825*z - 16046914*z^2 + 49059821*z^3 - 5618036*z^4 -
   8466010*z^5 + 1418661*z^6 + 574344*z^7 + 34596*z^8}

If you place variables on both lists you get a situation that amounts to 
semantically unspecified behavior. That is, each of the following 
behaviors could be regarded as "correct".

(1) Ignore the placement in the list of elimination variables.
(2) Ignore the placement in the list of variables to keep.
(3) Give an error message and return unevaluated.

With either of behaviors (1) and (2) it probably should give a warning 
message but does not do so at this time. To my knowledge it is in fact 
showing behavior (2) at this time, but this is not something I'd 
guarantee in general and across all versions past, present, and future.

By the way, for nontrivial problems it may be advantageous to specify 

Daniel Lichtblau
Wolfram Research

  • Prev by Date: Re: DeleteCases : several at once, conditions
  • Next by Date: RE: DeleteCases : several at once, conditions
  • Previous by thread: Re: elimination using GroebnerBasis
  • Next by thread: Using a Result from NMinimize