# Why sum of three squares of real polynomials is a sum of two squares?

If $f(x),g(x)$ are real polynomials, then $f^2+g^2+1$ is a sum of two squares of polynomials. This easily follows from Fundamental Theorem of Algebra, but is there an argument avoiding it? What are fields for which such a statement holds?

• $2x^2+1$ is clearly not the sum of two squares of $\mathbb{Q}$-coefficient polynomials (as $3$ is not the sum of two squares), so the statement does not hold over $\mathbb{Q}$. It does hold for real closed fields. – Vesselin Dimitrov Jun 18 '16 at 12:34
• What is the easy proof with FTA? – Gerald Edgar Jun 18 '16 at 14:11
• @GeraldEdgar Any non-negative polynomial $f(x)$ may have only real roots of even multiplicity and complex roots which are partitioned onto pairs of conjugates, thus $f(x)=C^2(x) (A(x)+iB(x))(A(x)-iB(x))=(CA)^2+(CB)^2$ for some real polynomials $C,A,B$. – Fedor Petrov Jun 18 '16 at 14:34
• Yes for a field containing $\sqrt{-1}$. No for an ordered field containing a sum of 2 squares which isn't a square e.g. $\mathbb{R}(t): x^2+t^2+1$ is not a sum of 2 squares in $\mathbb{R}(t)[x]$. – David Lampert Jun 18 '16 at 16:07
• @DavidLampert : $\sqrt{-1}\not\in\mathbb{R}$, yet the result holds... – Dima Pasechnik Jun 18 '16 at 18:43

## 1 Answer

Theorem 4.2 from this paper says that in general you will need the coefficients of the two squares to be algebraic numbers of exponential, in $\deg (f^2+g^2+1)$, degrees. More precisely, if the Galois group of $f^2+g^2+1\in\mathbb{Q}[x]$ is the symmetric group $S_{d}$, then you will need algebraic numbers of degree exponential in $d$.