Putnam 2001, Problem A-3

For each integer $m$, consider the polynomial
$$P_m(x) = x^4 - (2m+4)x^2 + (m-2)^2.$$
For what values of $m$ is $P_m(x)$ the product of two non-constant polynomials with integer coefficients?

Solution:
By the quadratic formula, if $P_m(x) = 0$, then $x^2 = m \pm 2\sqrt{2m} + 2$, and hence the four roots of $P_m$ are given by $S = \{\pm\sqrt{m} \pm \sqrt{2}\}$. If $P_m$ factors into two nonconstant polynomials over the integers, then some subset of $S$ consisting of one or two elements form the roots of a polynomial with integer coefficients.

First suppose this subset has a single element, say $\sqrt{m} \pm \sqrt{2}$; this element must be a rational number. Then $(\sqrt{m} \pm \sqrt{2})^2 = 2 + m \pm 2\sqrt{2m}$ is an integer, so $m$ is twice a perfect square, say $m = 2n^2$. But then $\sqrt{m} \pm \sqrt{2} = (n \pm 1)\sqrt{2}$ is only rational if $n = \pm 1$, i.e., if $m = 2$.

Next, suppose that the subset contains two elements; then we can take it to be one of $\{\sqrt{m} \pm \sqrt{2}\}$, $\{\sqrt{2} \pm \sqrt{m}\}$ or $\{\pm(\sqrt{m} + \sqrt{2})\}$. In all cases, the sum and the product of the elements of the subset must be a rational number. In the first case, this means $2\sqrt{m} \in \mathbb{Q}$, so $m$ is a perfect square. In the second case, we have $2\sqrt{2} \in \mathbb{Q}$, contradiction. In the third case, we have $(\sqrt{m} + \sqrt{2})^2 \in \mathbb{Q}$, or $m + 2 + 2\sqrt{2m} \in \mathbb{Q}$, which means that $m$ is twice a perfect square.

We conclude that $P_m(x)$ factors into two nonconstant polynomials over the integers if and only if $m$ is either a square or twice a square.

Note: a more sophisticated interpretation of this argument can be given using Galois theory. Namely, if $m$ is neither a square nor twice a square, then the number fields $\mathbb{Q}(\sqrt{m})$ and $\mathbb{Q}(\sqrt{2})$ are distinct quadratic fields, so their compositum is a number field of degree 4, whose Galois group acts transitively on $\{\pm\sqrt{m} \pm \sqrt{2}\}$. Thus $P_m$ is irreducible.