5. Find all cubic equations $P(x)=0$ that have at least two different real roots, one of which is the number 7, and which for every real number $t$ satisfy the condition: If $P(t)=0$, then $P(t+1)=1$.
SOLUTION. According to the problem, the cubic equation $P(x)=0$ should have two distinct real roots, let's denote them as $x_{1}=7$ and $x_{2} \neq x_{1}$ (we will use the specific value $x_{1}=7$ only when it is appropriate, otherwise we will write it generally as $x_{1}$). For the cubic polynomial $P(x)$, whose coefficient of the $x^{3}$ term we denote as $a, a \neq 0$, there exists another real number $x_{3}$ such that the factorization holds:

$$
P(x)=a\left(x-x_{1}\right)\left(x-x_{2}\right)\left(x-x_{3}\right)
$$

(equalities $x_{3}=x_{1}$ or $x_{3}=x_{2}$ are not excluded).

Let's recall how the existence of the third real root $x_{3}$ can be justified: the cubic polynomial $P(x)$ is necessarily divisible by the polynomial $\left(x-x_{1}\right)\left(x-x_{2}\right)$, the quotient is a linear binomial with leading coefficient $a$, i.e., the binomial $a x+b$, which can be written as $a\left(x-x_{3}\right)$ if we choose $x_{3}=-b / a$.

Our task is to find all suitable triples of numbers $a \neq 0, x_{2} \neq x_{1}$, and $x_{3}$ for which the polynomial (1) with the given value $x_{1}=7$ satisfies the implication $P(t)=0 \Longrightarrow P(t+1)=1$ for every real $t$. To analyze such a condition, it is necessary to know for how many different values of $t$ the equation $P(t)=0$ (and thus the equation $P(t+1)=1$) actually holds, i.e., how many different numbers are in the triple $x_{1}, x_{2}, x_{3}$. A priori, only the following possibilities A, B, and C can occur.
A. $x_{1}, x_{2}, x_{3}$ are three distinct numbers.

Then the cubic equation $P(x)=1$ has three distinct roots $x_{1}+1, x_{2}+1$, $x_{3}+1$, so we have the factorization

$$
P(x)-1=a\left(x-x_{1}-1\right)\left(x-x_{2}-1\right)\left(x-x_{3}-1\right) .
$$

Substituting the factorization (1) into this, we get the polynomial equality

$$
a\left(x-x_{1}\right)\left(x-x_{2}\right)\left(x-x_{3}\right)-1=a\left(x-x_{1}-1\right)\left(x-x_{2}-1\right)\left(x-x_{3}-1\right) .
$$

By comparing the coefficients of $x^{2}$ on the left and right sides, we obtain the equation

$$
-a\left(x_{1}+x_{2}+x_{3}\right)=-a\left(x_{1}+x_{2}+x_{3}+3\right),
$$

which is satisfied only in the case $a=0$, which contradicts the assumption $a \neq 0$. (Moreover, equation (2) does not hold even for $a=0$, when it takes the form $-1=0$.)
B. $x_{1}=x_{3}=7 \neq x_{2}$.

Then $P(x)=a(x-7)^{2}\left(x-x_{2}\right)$ and the equation $P(x)=1$ must hold for $x=7+1=8$ and for $x=x_{2}+1$. We thus obtain the system of two equations

$$
P(8)=a\left(8-x_{2}\right)=1 \quad \text { and } \quad P\left(x_{2}+1\right)=a\left(x_{2}-6\right)^{2}=1
$$

The reciprocal of the number $a$ is therefore equal to both the number $8-x_{2}$ and the number $\left(x_{2}-6\right)^{2}$. From the equation

$$
8-x_{2}=\left(x_{2}-6\right)^{2}
$$

we obtain the equation $x_{2}^{2}-11 x_{2}+28=0$ after rearrangement, which has two roots $x_{2}=4$ and $x_{2}=7$. The second root does not satisfy our condition $x_{2} \neq x_{1}$, so it must be $x_{2}=4$, from which $a=4^{-1}=\frac{1}{4}$ and $P(x)=\frac{1}{4}(x-7)^{2}(x-4)$.
C. $x_{1}=7 \neq x_{2}=x_{3}$.

Then $P(x)=a(x-7)\left(x-x_{2}\right)^{2}$ and the equation $P(x)=1$ must hold for $x=7+1=8$ and for $x=x_{2}+1$. We thus obtain the system of two equations

$$
P(8)=a\left(8-x_{2}\right)^{2}=1 \quad \text { and } \quad P\left(x_{2}+1\right)=a\left(x_{2}-6\right)=1
$$

The reciprocal of the number $a$ is therefore equal to both the number $\left(8-x_{2}\right)^{2}$ and the number $x_{2}-6$. From the equation

$$
\left(8-x_{2}\right)^{2}=x_{2}-6
$$

we obtain the equation $x_{2}^{2}-17 x_{2}+70=0$ after rearrangement, which has two roots $x_{2}=10$ and $x_{2}=7$. The second root does not satisfy our condition $x_{2} \neq x_{1}$, so it must be $x_{2}=10$, from which $a=4^{-1}=\frac{1}{4}$ and $P(x)=\frac{1}{4}(x-7)(x-10)^{2}$.

Conclusion. The conditions of the problem are satisfied by only two cubic equations

$$
\frac{1}{4}(x-7)^{2}(x-4)=0 \quad \text { and } \quad \frac{1}{4}(x-7)(x-10)^{2}=0 .
$$

Note. The possibility A in the given solution can be excluded due to the following consideration: If the polynomial $P$ had three distinct roots $k, l, m$, then the polynomial $P-1$ would, according to the assumption, have roots $k+1, l+1, m+1$. This, however, is not possible because the sum of the roots of the polynomial $P$ is the same as the sum of the roots of the polynomial $P-1$.

## GUIDING AND SUPPLEMENTARY PROBLEMS: