# About two polynomials $f,g$ such that $f=\pm g$

Let $R$ be an infinite commutative ring with unit and with characteristic zero. Assume that $f,g\in R[x_1,...,x_n]$ are nonzero and such that $f(x_1,...,x_n)=s(x_1,...,x_n) g(x_1,...,x_n)$, where $s: R \times R \rightarrow \{-1,1\}$ is a function with values $-1,1$. Is then $s$ constant, and consequently $f=g$ or $f=-g$?

My attempt. $f^2=g^2$, hence $(f-g)(f+g)=0$. If $R$ is additionally without zero-divisors $f=g$ or $f=-g$. Is the assumption about lack no zero divisors essential?

• This doesn't really make sense: on the one hand, $s$ is defined on $R \times R$; on the other, it has $n$ arguments: $x_1, \dots, x_n$. Also, are we talking about polynomials functions, or about polynomials? How should $f=sg$ be read? The last paragraph suggests that $f$ and $g$ are functions with values in $R$, but in the beginning of the question we are told that $f,g \in R[x_1, \dots, x_n]$. Commented May 21, 2016 at 17:38
• @AlexM: My interpretation is that $s$ should have been $R^m\to\{-1,1\}$, that $f$ and $g$ are polynomials with coefficients in $R$, and that $f=sg$ happens in the ring of all functions $R^m\to R$. What is a bit unclear, though, is whether "$f=g$ or $f=-g$" should be taken to be about abstract polynomials or polynomial functions. Commented May 21, 2016 at 19:20
• Since $s^{-1}(1)\subset Z(f-g)$ and $s^{-1}(-1)\subset Z(f+g)$, you need to prove that you cannot find two (nonzero) polynomials $h,k$ such that $Z(h)\cup Z(k)=R^n$.
– san
Commented May 22, 2016 at 2:11

(This is a revised answer; thanks to Henning Makholm for his comment.)

In the general case the statement is false; here we show a counter-example.

Let $$R=\mathbb{Z}[Y]/\left< 3Y, Y^3+Y\right>.$$ The elements of this ring are of the form $a+bY+cY^2$ with $a\in\mathbb{Z}$ and $b,c\in\mathbb{Z}_3$.

Define the two polynomials as $$f(x) = Y(x^3-x), \quad g(x)=(f(x))^2.$$ Due to $3|a^3-a$, $b^3=b$, $c^3=c$, $3Y=0$ and $Y^3=-Y$, $$f(a+bY+cY^2) = Y\big((a+bY+cY^2)^3-(a+bY+cY^2)\big) = \\ = (a^3-a)Y + b^3Y^4 + c^3Y^7 -bY^2 - cY^3 = b(Y^4-Y^2) + c(Y^7-Y^3) = \\ = -2b Y^2 = bY^2;$$ then $$g(a+bY+cY^2) = (bY^2)^2 = b^2 Y^4 = -b^2 Y^2.$$ As can be seen, $$\begin{matrix} f(a+bY+cY^2) = g(a+bY+cY^2) = 0 & \text{if b=0;} \\ f(a+bY+cY^2) = -g(a+bY+cY^2) \ne 0 & \text{if b=1;} \\ f(a+bY+cY^2) = +g(a+bY+cY^2) \ne 0 & \text{if b=-1.} \\ \end{matrix}$$

Instead of zero divisor freeness, we may make a weaker

$Assumption$. $m\cdot a$ cannot be zero for any $a\in R\setminus\{0\}$ and $m\in\mathbb{Z}\setminus\{0\}$.

Under this assumption, we will prove that either $f(a)=g(a)$ for every $a\in R$, or $f(a)=-g(a)$ for every $a\in R$.

$Lemma$. Let $h\in R[x]$ be a univariate polynomial. If $h(k)=0$ holds for infintely many integers $k$ then $h(k)=0$ holds for all integers $k$.

$Proof$: Let $h(x)=a_0+a_1x+\ldots+a_Nx^N$ and let $r_0,r_1,\ldots,r_N$ be distinct integers such that $h(r_0)=h(r_1)=\ldots=h(r_N)=0$. Take another integer $k$ arbitrarily; we will show that $h(k)=0$. The $N+2$ integer vectors $(1,k,k^2,\ldots,k^N), (1,r_0,r_0^2,\ldots,r_0^N), (1,r_1,r_1^2,\ldots,r_1^N), (1,r_N,r_N^2,\ldots,r_N^N) \in\mathbb{Z}^{N+1}$ are linearly dependent over $\mathbb{Q}$ but every $N+1$ of them are independent; therefore there are some nonzero integers $d,c_0,c_1,\ldots,c_N$ such that $$d\cdot (1,k,k^2,\ldots,k^N) = \sum_{j=0}^N c_j\cdot (1,r_j,r_j^2,\ldots,r_j^N).$$ Hence, $$d\cdot h(k) = \sum_{j=0}^N c_j\cdot h(r_j) = 0.$$ Since $d\in\mathbb{Z}\setminus\{0\}$, it follows that $h(k)=0$. $\Box$

Now we can prove the statement. For the sake of contradiction, assume that there are some points $a,b\in R^n$ such that $f(a)\ne g(a)$ and $f(b)\ne -g(b)$, so $f(a)=-g(a)\ne0$ and $f(b)=g(b)\ne0$. Consider the univariate polynomials $$p(t) = f\big(a+t(b-a)\big) - g\big(a+t(b-a)\big)$$ and $$q(t) = f\big(a+t(b-a)\big) + g\big(a+t(b-a)\big).$$ The sequence $a+k(b-a)$ ($k=0,1,2,\ldots$) contains infinitely many distinct elements from $R$, so either $p$ or $q$ has infinitely many integer roots. So, by the lemma, either $p(k)=0$ or $q(k)=0$ holds for every integer $k$. But we have $p(0)=2f(a)\ne0$ and $q(1)=2f(b)\ne0$, contradiction.

• Your definition of "characteristic zero" looks a bit nonstandard. For example, it claims that $\mathbb Z[X]/\langle 2X\rangle$ does not have characteristic zero. Commented May 24, 2016 at 10:45