WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Horner's Method

n
2
3
4
5
6
a
-3
-2
-1
1
2
3
4
new polynomial
k
0
1
2
3
4
P(x)
4
x
-
3
x
+2
2
x
+3
1
-1
2
0
3
1
1
Horner's method for polynomial computation both reduces the number of necessary multiplications and results in less numerical instability due to potential subtraction of large numbers. The rule is based on successive factorization to eliminate powers of
x
greater than 1:
P(x)=
a
n
n
x
+
a
n-
1
n-1
x
+...+
a
0
=((
a
n
x+
a
n-1
)x+...)x+
a
0
.
To compute
P(a)
, we find
b
n-1
=
a
n
,
b
n-2
=
a
n-1
+a
b
n-1
, ... ,
b
0
=
a
1
+a
b
1
,
P(x)=
a
0
+a
b
0
.
The factor polynomial is given by
Q(x)=P(x)/(x-a)=
b
n-1
n-1
x
+
b
n-2
n-2
x
+...+
b
0
.
You can select
n
, the degree of the polynomial;
a
, the desired value of
x
; and
k
, the number of steps in which
x
is replaced by
a
. The table shows the new coefficients after each step.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.