Calculate the remainder of the Euclidean division of $X^{100}-2 X^{51}+1$ by $X^{2}-1$.

## Roots and Factorization

Our goal here is to explain how the roots of a polynomial $P$, that is, the values of $x$ for which $P(x)=0$, provide information about $P$.

## Definition 11.

A real root of a polynomial $P$ in $\mathbb{R}[X]$ is a real number $x$ such that $P(x)=0$.

## Example 12.

The polynomial $P(X)=X+1$ has one real root, which is -1.

The polynomial $Q(X)=X^{2}-1$ has two real roots, which are -1 and +1.

The polynomial $R(X)=X^{2}+1$ has no real roots, because $R(x)=x^{2}+1 \geqslant 1>0$ for all real numbers $x$.

The polynomial $S(X)=X^{2}-2$ has two real roots, which are $-\sqrt{2}$ and $\sqrt{2}$. Note that, even though $S$ has rational coefficients, these roots are irrational.

The polynomial $T(X)=(X-1)^{2023}$ has one real root, which is -1.

The polynomial $U(X)=X^{3}-1$ has one real root, which is 1.

## Theorem 13.

Let $\mathbb{K}$ be one of the two sets $\mathbb{Q}$ or $\mathbb{R}$. Let $P$ be a polynomial in $\mathbb{K}[X]$ and $a$ be a number in $\mathbb{K}$. The following two statements are equivalent:

1. $a$ is a root (real) of $P$;
2. there exists a polynomial $Q$ in $\mathbb{K}[X]$ such that $P(X)=(X-a) Q(X)$.

Proof. First, if our polynomial $Q$ exists, it is clear that $P(a)=(a-a) Q(a)=0$, that is, $a$ is a root of $P$.

Conversely, if $P(a)=0$, let $Q$ and $R$ be the quotient and the remainder of the Euclidean division of $P$ by $X-a$. Since $0=P(a)=(a-a) Q(a)+R(a)=R(a)$, and since $R$ is constant, being of degree at most 0, we conclude as expected that $R=0$, and therefore that $P(X)=(X-a) Q(X)$.

## Theorem 14.

Let $n \geqslant 0$ be an integer. A polynomial in $\mathbb{R}[X]$ of degree $n$ has at most $n$ distinct real roots.

Proof. Suppose there exists a non-zero polynomial in $\mathbb{R}[X]$ whose number of real roots is strictly greater than its degree. We choose such a polynomial of minimal degree. We denote it by $P$, and we denote its degree by $d$.

Since $P$ is non-zero, its degree $d$ is at least 0, so $P$ has at least one real root, say $r$. Theorem 13 indicates that there exists a polynomial $Q$ such that $P(X)=(X-r) Q(X)$. Any root of $P$ is either equal to $r$ or a root of $Q$. Thus, $Q$ has at least $d$ distinct roots, and it is non-zero.

Now, $d=\operatorname{deg}(P)=\operatorname{deg}(X-r)+\operatorname{deg}(Q)=1+\operatorname{deg}(Q)$. Therefore, $Q$ has strictly more than $\operatorname{deg}(Q)$ roots, which contradicts the minimality of the degree of $P$. Our initial assumption was therefore invalid, which concludes the proof.

## Corollary 15.

Let $n \geqslant 0$ be an integer. A polynomial of degree at most $n$ having at least $n+1$ distinct real roots is zero. In particular, a polynomial having an infinite number of roots is necessarily the zero polynomial.
Let $Q$ and $R$ be the quotient and the remainder of this Euclidean division.

Since $\operatorname{deg}(R) < \operatorname{deg}(X^2 - 1) = 2$, the polynomial $R$ is an affine function, and there exist real numbers $a$ and $b$ such that $R(X) = aX + b$. We then proceed to evaluate it at $x = \pm 1$. Indeed, since $x^2 - 1 = 1 - 1 = 0$, we observe that

$$
x^{100} - 2x^{51} + 1 = (x^2 - 1)Q(x) + R(x) = R(x).
$$

Thus, $R(-1) = (-1)^{100} - 2(-1)^{51} + 1 = 4$ and $R(1) = 1^{100} - 2 \times 1^{51} + 1 = 0$. This means that $b - a = 4$ and $b + a = 0$, or equivalently, $a = -2$ and $b = 2$. Therefore, $R(X) = -2X + 2$.