TITLE: Would such polynomial identity exist? (related to sum of four squares)
QUESTION [7 upvotes]: Let $f_1,f_2,f_3,f_4,f_5 \in \mathbb{Q}[x]$ be linear and
coprime and not all constant.

Is it possible $ f_1^2+f_2^2+f_3^2+f_4^2=f_5^2$?

I suppose the answer is negative.
If this is possible, solving $f_5(x)=N$ would give
deterministic representation of $N$ as sum of four
squares (probabilistic algorithms exist).
Couldn't solve this by equating coefficients.

What is the smallest natural $k$ such that
  subject to the same constraints $f_1^2+f_2^2+\cdots+f_k^2=f_{k+1}^2$?

REPLY [5 votes]: The answer would be positive if there would be no condition on rationality of the coefficients. With this condition the answer is negative. Indeed, assume first that $f_5$ is not constant. Then $f_5(t) = 0$ for some $t \in \mathbb{Q}$. Substituting it into the equation you get $\sum f_i^2(t) = 0$, hence each $f_i(t) = 0$ as we are over rationals. It follows that all $f_i$ are proportional to $f_5$. On the other hand, if $f_5$ is constant then by looking at the leading coefficients you see that the sum of their squares is zero, so each coefficient is zero, and so all $f_i$ are constant too.
Note that the same argument works for arbitrary number of squares and for any degree of polynomials.
Over $\mathbb{C}$ it is easy to give an example. Take
$f_1 = x$, $f_2 = \sqrt{-1} x$, $f_3 = 0$, $f_4 = f_5 = 1$.