Horner's scheme (or Horner's rule, Horner 's method, Ruffini-Horner's method ) is an algorithm for calculating the value of a polynomial written as the sum of monomials (monomials) for a given value of a variable. Horner's method allows finding the roots of the polynomial [1] , as well as calculating the derivatives of the polynomial at a given point. Horner's scheme is also a simple algorithm for dividing a polynomial by a bin of the form . The method is named after William George Horner , but Paolo Ruffini was 15 years ahead of Horner, and the Chinese knew this method in the 13th century.
Algorithm Description
Polynomial given
Let it be required to calculate the value of a given polynomial for a fixed value . Imagine a polynomial
in the following form:
We define the following sequence:
-
- ...
- ...
Sought value there is
. We show that this is so.
In the received entry form substitute
and we will calculate the value of the expression, starting with the inner brackets. To do this, we will replace the subexpressions through
:
Using Horner's scheme for dividing a polynomial by a bin
When dividing a polynomial on it turns out a polynomial with the remainder .
Moreover, the coefficients of the resulting polynomial satisfy the recurrence relations
In the same way, one can determine the multiplicity of roots (use the Horner scheme for a new polynomial). Also, the scheme can be used to find the coefficients in the expansion of the polynomial in powers :
Use
Calculate for We use synthetic division:
x ₀│ x ³ x ² x ¹ x ⁰
3 │ 2 −6 2 −1
│ 6 0 6
└─────────────────────────
2 0 2 5
Here, in the first line, the value x0 and the coefficients of the polynomial are written.
The values (in columns) in the third row correspond to the sum of the values of the first and second rows ( ), and the values of the second row are the product of x by the value in the third row of the previous column ( )
For example, if we see that - The values in the third row. So synthetic fission is based on the Horner method.
Divide on :
2 │ 1 −6 11 −6
│ 2 −8 6
└─────────────────────────
1 −4 3 0
New polynomial .
Let be and . Divide on {\ displaystyle f_ {2} \, (x)} using Horner's method.
2 │ 4 −6 0 3 │ −5
────┼───────────────────────────────
1 │ 2 −2 −1 │ 1
└───────────────────────────────
2 −2 −1 1 │ −4
The third line is the sum of the first two divided by two. Each value of the second row matches the value of the third row in the previous column. Division answer:
Using Horner's scheme, you can also calculate the value of a number in a positional calculus.
Notes
- ↑ If the integer polynomial has integer roots, then they will be found among the divisors of the free term. Kurosh A. G. § 57. Rational roots of integer polynomials // Course of higher algebra . - The science. - Moscow, 1968.
See also
- Column polynomial division
- Column Division
- Lily method
Literature
- Levitin A. V. Chapter 6. Transformation method: Horner scheme and exponentiation // Algorithms. Introduction to the development and analysis - M .: Williams , 2006. - S. 284–291. - 576 p. - ISBN 978-5-8459-0987-9
- Volkov EA. § 2. Calculation of polynomial values. Horner's scheme // Computational methods. - Textbook. manual for universities. - 2nd ed., Rev. - M .: Nauka, 1987 .-- 248 p.
- S. B. Gashkov. § 14. Horner's scheme and translation from one positional system to another // Number systems and their application . - M .: ICMMO , 2004 .-- S. 37-39. - (Library "Mathematical Education"). - ISBN 5-94057-146-8 .
Links
- Horner's scheme
- The calculation of multidimensional polynomials is a generalization of the Horner scheme to the case of a polynomial in several variables.
- Horner Method in a Complex Field