1
$\begingroup$

Recently I tried to solve a multivariate quadratic equation over the reals, but with a parameter value. Since that took too long, I decided to try GroebnerBasis, but encountered a strange behavior. My polynomials are too long, but I could find a reduced case with the same behavior.

When I try GroebnerBasis[1/(Pi (Pi - 1)) + x, {x}], I get

{-(1/((1 - \[Pi]) \[Pi])) + x}

which is to be expected, but when I try GroebnerBasis[1/(n (n - 1)) + x, {x}], I get

{1 - 1/(1 - n) + n/(1 - n), -(1/(1 - n)) - 1/n + 
  1/((1 - n) n), -(1/(1 - n)) - 1/n + x}

Here, $n$ is supposed to be a parameter value.

Of course, among these 3 items, the first two are zeros, and we get the original polynomial as the third item, so technically the ideal spanned by these three items are the same as the principal ideal generated by the given polynomial. But why do I get two additional zeros in the Groebner basis of a principal ideal?

$\endgroup$
1
  • $\begingroup$ Under the hood GB creates new internal variables and relations to handle the denominators. In post-processing it converts back to the original expressions. Hence one can get these "zeros" as rational functions in the result. The proper way to handle this is as shown in the reply by @DanielHuber. $\endgroup$ Commented Nov 27, 2023 at 17:18

1 Answer 1

5
$\begingroup$

Obviously MMA consider n as a variable. You can see this by writing:

GroebnerBasis[1/(n (n - 1)) + x, {x, n}]

enter image description here

what is the same as your result. To circumvent this, you can specify:

GroebnerBasis[1/(n (n - 1)) + x, {x}, CoefficientDomain -> RationalFunctions]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.