# Simple yet confusing: if $f^2(x)=g^2(x)(x^2+1)$ then $gcd( f^2(x),g^2(x))=(x^2+1)$?

As mentioned in the title:

f(x) and g(x) are polynomials above the Rationals field. if $f^2(x)=g^2(x)(x^2+1)$ then does it mean that $gcd( f^2(x),g^2(x))=(x^2+1)$? or maybe it isn't the greatest common divisor but some divisor that was found.

By Euclid's algorithm it seems that's exactly the gcd, but it seems logical to me that maybe it's some divisor as well.. please help? Thanks

• Put $g(x)=1$. Then the $\gcd$ should be $1$, not $x^2+1$. – user127249 Feb 9 '14 at 17:29
• And since $f^2$ is divisible by $g^2$ then $\gcd(f^2,g^2)=g^2$. – user127249 Feb 9 '14 at 17:30
• I'm dividng by $g^2$. why the gcd is not $x^2+1$ by Euclids? – CnR Feb 9 '14 at 17:32
• You are probably iterating in Euclid's by taking the quotient instead of the remainder. Review Euclid's algorithm. You divide $f^2$ by $g^2$ and get remainder zero. When you get remainder zero in Euclid's algorithm, you stop, and the previous divisor was the $\gcd$. – user127249 Feb 9 '14 at 17:34
• I understand what you're saying, but if I divide by $1+x^2$ I get that this is the gcd? ($1+x^2$ is not 0 because I'm talking about the Rationals) – CnR Feb 9 '14 at 17:39

I think the problem is that, if $f$ and $g$ are polynomials with rational coefficients, then the equation $f^2=(x^2+1)g^2$ is impossible unless $f$ and $g$ are constants. This is for the same reason that $a^2=2b^2$ is impossible if $a$ and $b$ are to be integers, unless $a=b=0$. The integers form a unique factorization domain, and 2 is not a square; the polynomials over the rationals form a unique factorization domain, and $x^2+1$ is not a square.
If $f$ and $g$ are constants, then necessarily $f=\pm g$. If they are nonzero constants, then, as polynomials with rational coefficients, their (monic) gcd is 1, and certainly not $x^2+1$.
HINT. The gcd of two or more integers is the largest positive integer that divides the numbers without a remainder. This definition can also be extended to polynomials. For example: $$3x^2 - 12 = 3·(x - 2)·(x + 2)$$ $$3x^3 + 24 = 3·(x + 2)· (x^2 - 2x + 4)$$ $$6x + 12 = 2 ·3·(x + 2)$$ Then $gcd=3(x+2)$. In the our case we have that, since $f^2$ is divisible by $g^2$ then $gcd=g^2$.
• but $f^2$ is divisible by $1+x^2$ as well because it is not zero (I'm talking above the Rational field), then is it the gcd ? – CnR Feb 9 '14 at 17:38
• but $g^2$ isn't divisible for (1+x^2). – Mark Feb 9 '14 at 17:42