Let $P$ be a polynomial such that the remainder of the Euclidean division of $P$ by $X-1$ is 2 and the remainder of the division of $P$ by $X-2$ is 1. What is the remainder of the division of $P$ by $(X-1)(X-2)$?
We know that we have the relations

$$
\left\{\begin{array}{l}
P(x)=Q(x)(x-1)+2 \\
P(x)=Q^{\prime}(x)(x-2)+1
\end{array}\right.
$$

for two polynomials $Q$ and $Q^{\prime}$, and we are looking for a polynomial $R$ of degree less than 2 such that

$$
P(x)=Q^{\prime \prime}(x)(x-1)(x-2)+R(x)
$$

Since $R$ is of degree $\leqslant 1$, we have $R(x)=a x+b$ for coefficients $a$ and $b$ to be found. On the other hand, by evaluating the equations above at $x=1$ and $x=2$, we find $P(1)=2$ and $P(2)=1$, and thus $R(1)=2$ and $R(2)=1$. From this, it is easy to see that $R(x)=3-x$.

## Degree and Order of Magnitude