How to find a root swapper polynomial?

IMC 2020 problem 6 was based on the following idea: if $$P(x)=x^3-3x+1$$ then $$Q(x)=x^2-2$$ has the property that it cyclically rotates the roots of $$P$$. That is, if we call them $$x_1$$, $$x_2$$, $$x_3$$ then $$Q(x_1)=x_2$$, $$Q(x_2)=x_3$$ and $$Q(x_3)=x_1$$. I want to find polynomials like this in general.

If $$P(x)=(x-x_1)(x-x_2)(x-x_3)=x^3-ax^2+bx-c$$ and $$Q(x)=kx^2+lx+m$$ and $$Q(x_1)=x_2$$, $$Q(x_2)=x_3$$ and $$Q(x_3)=x_1$$ then

$$\begin{bmatrix} x_1^2 & x_1 & 1 \\ x_2^2 & x_2 & 1 \\ x_3^2 & x_3 & 1 \end{bmatrix} \begin{bmatrix} k \\ l \\ m \end{bmatrix}= \begin{bmatrix} x_2 \\ x_3 \\ x_1 \end{bmatrix}.$$

The determinant of the Vandermonde matrix is the product of the pairwise differences which is the square root of the discriminant, so it's expressible as a function of $$a,b,c$$. $$k$$ is expressible as a symmetric polynomial too, so we can write $$k=\frac{a^2-3b}{\sqrt{|\Delta|}}$$, however $$l$$ and $$m$$ have expressions as a function of the roots which are not symmetric, so we can't write them as a function of the coefficients:

$$l=\frac{-x_1^2-x_2^3-x_3^3+x_1^2x_3+x_2^2x_1+x_3^2x_2}{\sqrt{|\Delta|}}$$

$$m=\frac{x_1^2x_2^2+x_1^2x_3^2+x_2^2x_3^2-x_1^3x_2-x_2^3x_3-x_3^3x_1}{\sqrt{|\Delta|}}.$$

The problem with $$l$$ is the $$x_1^2x_3+x_2^2x_1+x_3^2x_2$$ bit, because it's missing the other half $$x_1^2x_2+x_2^2x_3+x_3^2x_1$$ which we would need to add to make it symmetric. $$m$$ is similar.

So my questions are:

• When are the expressions for $$l$$ and $$m$$ "nice"? For example if the coefficients are rational when are $$l,m$$ rational?

• Can we require something of the roots which makes $$l,m$$ expressible as a function of the coefficients? It seems like they're "nearly" symmetric, so it feels like it shouldn't take much to get there.

• What happens in higher degrees?

• So far I've been thinking about $$Q$$ having degree one less than $$P$$. Does this always allow for the "cleanest" solution? In particular the case where $$P(x)=(x-x_1)(x-x_2)=x^2-ax+b$$ is easy: $$Q(x)=a-x$$.

• – lhf
Jul 18, 2021 at 17:26
• @Blue They cannot be polynomials in the coefficients of $P$. In fact, they depend on the square root of the discriminant, accounting for two choice of cyclic permutations.
– WimC
Jul 18, 2021 at 19:29
• @WimC: Ah. I seem to have been thinking (out loud) too narrowly.
– Blue
Jul 18, 2021 at 20:59
• "$Q$ having degree one less than $P$" $\,-\,$ That is possible when all roots of $P$ are real and distinct, since you can always interpolate a unique polynomial of degree $n-1$ between $n$ real points. It is not necessarily possible when some of the roots are complex, for example $P(x)=x^3-1$ has the "swapper polynomials" $Q_1(x) = \omega x$ and $Q_2(x) = \omega^2 x$ where $\omega$ is a complex cube root of unity. In this case $Q(x)$ $=Q_1(x)Q_2(x)$ $=x^2$ also permutes the roots, but not cyclically since $Q(1)=1$.
– dxiv
Jul 18, 2021 at 22:42

Both $$l$$ and $$m$$ are rational when the discriminant $$d$$ of the cubic $$P$$ is a rational square. For example, let $$\lambda = x_1^2x_2 + x_2^2x_3 + x_3^2x_1$$ and $$\overline \lambda$$ its “symmetric conjugate” by swapping any two roots. Then $$(x-\lambda)(x-\overline \lambda)$$ is a rational polynomial with discriminant $$d$$, a rational square, so both $$\lambda$$ and $$\overline \lambda$$ are rational.

Similarly for $$\mu = x_1^3x_2 + x_2^3x_3 + x_3^3x_1$$ the discriminant of $$(x - \mu)(x - \overline \mu)$$ is $$d \cdot (x_1 + x_2 + x_3)^2$$, a rational square. Conclusion: if $$d$$ is a rational square then the coefficients of the permutation polynomials can indeed be expressed in the coefficients of $$P$$. The choice $$\pm \sqrt d$$ leads to two non~trivial permutations.

The condition that $$d$$ is a rational square is also required to ensure that the splitting field of $$P$$ has degree either $$1$$ or $$3$$ over $$\mathbb Q$$.