2.6 zeros of polynomials and horner’s methodzxu2/acms40390f13/lec-2.6.pdf · horner’s method...
TRANSCRIPT
-
2.6 Zeros of Polynomials and Horner’s Method
1
-
2
Zeros of Polynomials
• Definition: Degree of a Polynomial A polynomial of degree 𝒏 has the form 𝑃 𝑥 = 𝑎𝑛𝑥
𝑛 + 𝑎𝑛−1𝑥𝑛−1 +⋯+ 𝑎1𝑥 + 𝑎0, 𝑎𝑛 ≠ 0
Where the 𝑎𝑖′𝑠 are constants (either real or complex)
called the coefficients of 𝑃 𝑥 • Fundamental Theorem of Algebra If 𝑃 𝑥 is a polynomial of degree 𝑛 ≥ 1, with real or complex coefficients, 𝑃 𝑥 = 0 has at least one root. • Corollary There exists unique constants 𝑥1, 𝑥2, … , 𝑥𝑘 and unique positive integers 𝑚1, 𝑚2, … ,𝑚𝑘 such that 𝑚𝑖
𝑘𝑖=1 = 𝑛
and 𝑃 𝑥 = 𝑎𝑛(𝑥 − 𝑥1)
𝑚1(𝑥 − 𝑥2)𝑚2…(𝑥 − 𝑥𝑘)
𝑚𝑘
-
Remark: 1. Collection of zeros is unique
2. 𝑚𝑖 are multiplicities of the individual zeros
3. A polynomial of degree 𝑛 has exactly 𝑛 zeros, counting multiplicity.
• Corollary
Let 𝑃(𝑥) and 𝑄(𝑥) be polynomials of degree at most 𝑛. If 𝑥1, 𝑥2, … , 𝑥𝑘 with 𝑘 > 𝑛 are distinct numbers with 𝑃 𝑥𝑖 = 𝑄(𝑥𝑖) for all 𝑖 = 1,2, … , 𝑘, then 𝑃 𝑥 = 𝑄(𝑥) for all values of 𝑥.
Remark: If two polynomials of degree 𝑛 agree at at least (n+1) points, then they must be the same.
3
-
Horner’s Method
• Horner’s method is a technique to evaluate polynomials quickly. Need 𝑛 multiplications and 𝑛 additions to evaluate 𝑃 𝑥0 .
• Assume 𝑃 𝑥 = 𝑎𝑛𝑥𝑛 + 𝑎𝑛−1𝑥
𝑛−1 +⋯+ 𝑎1𝑥 + 𝑎0. Evaluate 𝑃 𝑥0 .
Let 𝑏𝑛 = 𝑎𝑛, 𝑏𝑘 = 𝑎𝑘 + 𝑏𝑘+1𝑥0, for 𝑘 = 𝑛 − 1 , 𝑛 − 2 ,… , 1,0
Then 𝑏0 = 𝑃 𝑥0 .
• At the same time, we also computed the decomposition:
𝑃 𝑥 = 𝑥 − 𝑥0 𝑄 𝑥 + 𝑏0,
Where 𝑄 𝑥 = 𝑏𝑛𝑥𝑛−1 + 𝑏𝑛−1𝑥
𝑛−2 +⋯+ 𝑏2𝑥 + 𝑏1 4
-
Remark:
1. 𝑃′ 𝑥0 = 𝑄(𝑥0), which can be computed by using Horner’s method in (n-1) multiplications and (n-1) additions.
2. Horner’s method is nested arithmetic
5
-
• Example. Use Horner’s method to evaluate 𝑃 𝑥 = 2𝑥4 − 3𝑥2 + 3𝑥 − 4 at 𝑥0 = −2.
Solution: Step 1: 𝑎4 = 2, 𝑏4 = 2
Step 2: 𝑎3 = 0, 𝑏3 = 𝑎3 + 𝑏4𝑥0 = 0 + 2 −2 = −4
Step 3: 𝑎2 = −3, 𝑏2 = 𝑎2 + 𝑏3𝑥0 = −3 + −4 −2 = 5
Step 4: 𝑎1 = 3, 𝑏1 = 𝑎1 + 𝑏2𝑥0 = 3 + 5 −2 = −7
Step 5: 𝑎0 = −4, 𝑏0 = 𝑎0 + 𝑏1𝑥0 = −4 + −7 −2 = 10
Thus 𝑃 −2 = 𝑏0 = 10
Remark: 𝑎4𝑥
4 + 𝑎3𝑥3 + 𝑎2𝑥
2 + 𝑎1𝑥 + 𝑎0 =
𝑎4𝑥 + 𝑎3 𝑥 + 𝑎2 𝑥 + 𝑎1 𝑥 + 𝑎0
6