Let $a_{1}, \ldots, a_{n}$ be distinct real numbers and $b_{1}, \ldots, b_{n}$ be any real numbers. What are the polynomials $P$ such that $P\left(a_{i}\right)=b_{i}$ for all $i$?

## Solutions
Let $L(X)$ be the polynomial of degree at most $n-1$ such that $L\left(a_{i}\right)=b_{i}$, and let $A(X)$ be the polynomial $(X - a_{1})(X - a_{2})(X - a_{3}) \cdots (X - a_{n})$. It is easy to verify that the set of polynomials that can be written in the form $P(X) = A(X) Q(X) + L(X)$ satisfy the conditions of the exercise.

Let's show that these are the only ones. To do this, consider a solution $P$, and let $Q$ and $R$ be its quotient and remainder in the Euclidean division by $A$. By construction, $R$ is of degree at most $n-1$, and

$$
R\left(a_{i}\right) = P\left(a_{i}\right) - Q\left(a_{i}\right) A\left(a_{i}\right) = P\left(a_{i}\right) = b_{i}
$$

for all $i$. The Lagrange interpolation theorem tells us that $R = L$. In conclusion, the polynomials $P$ we are looking for are the polynomials of the form $P(X) = A(X) Q(X) + L(X)$.

## 4 Order 2 (Melvil & Maryam)