📖 Principe
Soit \(P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0\).
On pose \(P(x) = (x - a)Q(x) + R\), où \(R\) est le reste (une constante).
Le schéma de Horner permet de calculer rapidement les coefficients du quotient \(Q(x)\) et le reste \(R\).
| Coefficients de \(P(x)\) |
\(a_n\) |
\(a_{n-1}\) |
\(a_{n-2}\) |
\(\cdots\) |
\(a_1\) |
\(a_0\) |
| \(a\) |
\(b_{n-1} = a_n\) |
\(b_{n-2} = a_{n-1} + a \cdot b_{n-1}\) |
\(b_{n-3} = a_{n-2} + a \cdot b_{n-2}\) |
\(\cdots\) |
\(b_0 = a_1 + a \cdot b_1\) |
\(R = a_0 + a \cdot b_0\) |
📌 Schéma de Horner
Les coefficients du quotient \(Q(x) = b_{n-1} x^{n-1} + b_{n-2} x^{n-2} + \cdots + b_0\) sont obtenus par :
\[ b_{n-1} = a_n \]
\[ b_{k-1} = a_k + a \times b_k \quad \text{pour } k = n-1, n-2, \ldots, 1 \]
\[ R = a_0 + a \times b_0 \]
📌 Exemple
Soit \(P(x) = 2x^3 - 3x^2 + 0x + 5\). Calculer \(P(2)\) par le schéma de Horner :
\[ P(2) = 9 \quad \text{et} \quad Q(x) = 2x^2 + x + 2 \]
Donc \(P(x) = (x - 2)(2x^2 + x + 2) + 9\).
📌 Condition de racine
\(P(a) = 0\) si et seulement si le reste \(R = 0\).
\[ P(x) = (x - a)Q(x) \iff R = 0 \]