This is my attempt to giveEDIT: Following a more motivated version of darij grinberg's argument.
Let's try to work in the greatest possible degreeclever observation of generality. The equation $X^3 + aX^2 + b X + c$ implies the equationsuser44191 in the roots $\alpha_1,\alpha_2,\alpha_3$,
$$\alpha_1 + \alpha_2 + \alpha_3 = -a,$$
$$\alpha_1\alpha_2+ \alpha_2\alpha_3 +\alpha_1\alpha_3=b,$$
$$\alpha_1\alpha_2\alpha_3 = -c.$$comments:
If we imagine that $a$ and $b$ are fixed$f(x)$ is a monic polynomial, and $c$ is varyinga number, we can dropthen the last equationpolynomial $xf(x)^2+c$ has a similar property to your example (the case $f(x)=x+1/2$). Because we have two equations in three variablesIndeed, we can deduce one equation in any two of the variables, say $\alpha_1$ andhave $\alpha_2$.$x = \frac{-c}{f(x)^2}$ so
When does that equation force their product to be a square?
- If $-c$ is a nonzero square then all rational roots are squares.
- if $-c$ is a nonsquare then all rational roots are not square, but their ratios are square.
- If $-c$ is zero then one root is zero and the rest are double (this doesn't really fit the pattern).
Writing $\alpha_3 = -a-\alpha_1-\alpha_2$This produces polynomials of odd degree. For even degree examples, we can do $f(x)^2+cx$. This gives $x =\frac{ f(x)^2}{-c}$ so we have the equation insame thing except if $\alpha_1,\alpha_2$$-c$ is zero than all roots are double, and there is a special case if $f(0)=0$.
$$\alpha_1\alpha_2 = (\alpha_1+\alpha_2) (a + \alpha_1 + \alpha_2) + b. $$ So we have many examples of polynomials of this type.
Thus, whenever $b=a^2/4$,(See the formula on right side is $(\alpha_1 + \alpha_2 + a/2)^2$ and $\alpha_1\alpha_2$ is forcededit history for an earlier argument, special to be a square if $F$the case of degree 3 polynomials, if $\alpha_1,\alpha_2 \in F$desired. This was inspired by darij grinberg's answer, and that earlier answer inspired user44191's comment, so both of them are partially responsible for this solution.)