0% found this document useful (0 votes)
43 views32 pages

Week 3 Roots of Polynomials

This document discusses methods for finding the roots of polynomials. It begins by explaining how higher-order differential equations can be expressed as systems of first-order differential equations, with an example of a second-order equation. It then covers several iterative methods for approximating the roots of polynomials, including Newton-Raphson, secant, Muller's, and Bairstow's methods. Bairstow's method allows estimating complex roots by dividing the polynomial by a quadratic factor at each step. The document provides examples to illustrate how each method is applied.

Uploaded by

Bob Nghiem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views32 pages

Week 3 Roots of Polynomials

This document discusses methods for finding the roots of polynomials. It begins by explaining how higher-order differential equations can be expressed as systems of first-order differential equations, with an example of a second-order equation. It then covers several iterative methods for approximating the roots of polynomials, including Newton-Raphson, secant, Muller's, and Bairstow's methods. Bairstow's method allows estimating complex roots by dividing the polynomial by a quadratic factor at each step. The document provides examples to illustrate how each method is applied.

Uploaded by

Bob Nghiem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Roots of Polynomials

Dr. Meead Saberi / Dr. Wei Liu


Research Centre for Integrated Transport
Innovation (rCITI)
School of Civil and Environmental Engineering
Why polynomials?
Polynomials have many applications in engineering. The most
powerful application is in characterizing dynamic systems.

𝑓 𝑥 = 𝑎% + 𝑎'𝑥 + 𝑎(𝑥 ( + ⋯ + 𝑎* 𝑥 *
Remember linear ordinary differential
equations (or linear ODEs)?
First-order ODE.

𝑑𝑦 𝑑𝑦
= 𝑓(𝑥, 𝑦) or + 𝑝 𝑥 𝑦 = 𝑞(𝑥)
𝑑𝑥 𝑑𝑥

Second-order ODE.

𝑑(𝑦 𝑑𝑦
𝑝 𝑥 ( +𝑞 𝑥 + 𝑟 𝑥 𝑦 = 𝑔(𝑥)
𝑑𝑥 𝑑𝑥
Let’s focus on a simple second-order
system
𝑑(𝑦 𝑑𝑦
𝑎( ( + 𝑎' + 𝑎%𝑦 = 𝑓(𝑡)
𝑑𝑡 𝑑𝑡

Can we somehow express this as a pair of first-order ODEs?

𝑑𝑦 𝑑𝑧
𝑧= 𝑎( + 𝑎'𝑧 + 𝑎%𝑦 = 𝑓(𝑡)
𝑑𝑡 𝑑𝑡

𝑑𝑧 𝑓 𝑡 − 𝑎'𝑧 − 𝑎%𝑦
=
𝑑𝑡 𝑎(
A system of n first-order ODEs
We converted a second-order ODE to a system of first-order
ODEs as below

𝑑𝑧 𝑓 𝑡 − 𝑎'𝑧 − 𝑎%𝑦
=
𝑑𝑡 𝑎(
𝑑𝑦
=𝑧
𝑑𝑡

In a similar fashion, an nth-order linear ODE can be expressed as


system of n first-order ODEs.
Solution of ODE system
𝑑(𝑦 𝑑𝑦
𝑎( ( + 𝑎' + 𝑎%𝑦 = 𝑓(𝑡)
𝑑𝑡 𝑑𝑡

“General solution” is when we make 𝑓(𝑡)=0


𝑑(𝑦 𝑑𝑦
𝑎( ( + 𝑎' + 𝑎% 𝑦 = 0
𝑑𝑡 𝑑𝑡

The general solution is of the form of 𝑦 = 𝑒 9:

𝑎(𝑟 (𝑒 9: + 𝑎'𝑟𝑒 9: + 𝑎%𝑒 9: = 0


𝒂𝟐 𝒓𝟐 + 𝒂𝟏 𝒓 + 𝒂𝟎 = 𝟎 This is now polynomial and is
called “characteristic equation”
Hanging Bridges
Example: Flexible hanging cable
A hanging cable is only
subject to its own weight.
Its weight (N/m) acts as a
uniform load per unit
length along the cable. Ta
and Tb are tension forces
at the two ends of the
cable. Based on horizontal
and vertical force
(
balances, following ODE 𝑑(𝑦 𝑤 𝑑𝑦
( = 1+
model of the cable can be 𝑑𝑥 𝑇B 𝑑𝑥
derived:
Let’s get back to polynomials
But, before we start finding the roots of a polynomial, let’s re-
visit finding the roots of equations.

Newton-Raphson method
𝑓(𝑥D )
𝑥DE' = 𝑥D − F
𝑓 𝑥D
Secant method
What if when using the Newton-Raphson method, it was
difficult to take the derivate of f(x)?

Instead, we approximate the


derivative by a “backward finite
divided difference” as

𝑓 𝑥DH' − 𝑓(𝑥D )
𝑓F 𝑥D ≅
𝑥DH' − 𝑥D
(𝑥DH'−𝑥D )
𝑥DE' = 𝑥D − 𝑓(𝑥D )
𝑓 𝑥DH' − 𝑓(𝑥D )
Müller’s method
Secant’s method projects a straight line to the x axis through
two function values while Müller's method takes a similar
approach, but projects a parabola through three points.
Müller’s method
We need to derive the coefficients
of the parabola that goes through
the three points. These coefficients
are substituted into the quadratic
formula where the parabola
intercepts the x axis – that is, the
root estimate.

𝑓 𝑥 = 𝑎(𝑥 − 𝑥()(+𝑏 𝑥 − 𝑥( + 𝑐
Intersecting 3 points
𝑓 𝑥% = 𝑎(𝑥% − 𝑥()(+𝑏 𝑥% − 𝑥( + 𝑐
𝑓 𝑥' = 𝑎(𝑥' − 𝑥()(+𝑏 𝑥' − 𝑥( + 𝑐
𝑓 𝑥( = 𝑎(𝑥( − 𝑥()(+𝑏 𝑥( − 𝑥( + 𝑐

Solving simultaneous equations

ℎ% = 𝑥' − 𝑥% 𝑓(𝑥') − 𝑓(𝑥%) 𝑓(𝑥() − 𝑓(𝑥')


𝛿% = 𝛿' =
ℎ' = 𝑥( − 𝑥' 𝑥' − 𝑥% 𝑥( − 𝑥'
Intersecting 3 points
Solving simultaneous equations
𝛿' − 𝛿%
𝑎=
ℎ' + ℎ%
𝑏 = 𝑎ℎ'+ 𝛿'

𝑐 = 𝑓(𝑥()

𝑓 𝑥 = 𝑎(𝑥 − 𝑥()(+𝑏 𝑥 − 𝑥( + 𝑐
Root estimate
−2𝑐
𝑥M = 𝑥( +
𝑏 ± 𝑏 ( − 4𝑎𝑐

𝛿' − 𝛿%
𝑎=
ℎ' + ℎ%
𝑏 = 𝑎ℎ'+ 𝛿'

𝑐 = 𝑓(𝑥()
Example
User Muller’s method with guesses of 𝑥%=4.5, 𝑥'=5.5 and
𝑥(=5 to determine a root of the following equations.

𝑓 𝑥 = 𝑥 M − 13𝑥 − 12
Example
Let’s first evaluate the function at the three guess points:

𝑓 4.5 = 20.625
𝑓 5.5 = 82.875
𝑓 5 = 48
We then calculate
𝑓(𝑥') − 𝑓(𝑥%)
ℎ% = 𝑥' − 𝑥% = 1 𝛿% = = 62.25
𝑥' − 𝑥%
ℎ' = 𝑥( − 𝑥' = −0.5 𝑓(𝑥() − 𝑓(𝑥')
𝛿' = = 69.75
𝑥( − 𝑥'
Example
We can now calculate

𝛿' − 𝛿%
𝑎= = 15
ℎ' + ℎ%
𝑏 = 𝑎ℎ'+ 𝛿' = 62.25

𝑐 = 𝑓(𝑥()=48
First root estimate
So the first estimate of the root is

−2(48)
𝑥M = 5 +
62.25 ± 31.54461

𝑥M = 3.976487

−1.023513
𝜀Y = 100% = 25.74%
3.976487
The error is probably too large still. We should do another
iteration.
More iterations
So, the new three guess points are

𝑥% = 5.5
iteration 𝑥9 𝜀Y %
𝑥' = 5 0 5 -
𝑥( = 3.976487 1 3.976487 25.74
2 4.00105 0.6139
3 4 0.0262
4 4 0.0000119
Bairstow’s method
Bairstow’s method is an iterative approach related loosely to
both the Muller and Newton-Raphson methods.

Consider a factored form of a polynomial function as

𝑓 𝑥 = (𝑥 + 1)(𝑥 − 4)(𝑥 − 5)(𝑥 + 3)(𝑥 − 2)

If we divided by a factor that is not a root, let’s say (𝑥 + 6),


then the function becomes a fourth-order polynomial but a
remainder would result.
Bairstow’s method
𝑓 𝑥 = (𝑥 + 1)(𝑥 − 4)(𝑥 − 5)(𝑥 + 3)(𝑥 − 2)

(a) Guess a value for the root, 𝑥 = 𝑡


(b) Divide the polynomial by the factor 𝑥 − 𝑡
(c) Determine if there is a remainder. If not, the guess was
perfect and 𝑥 = 𝑡 is a root, indeed. If there is a remainder, we
need to adjust the guess and repeat the process.
Bairstow’s method
Let’s now consider a general polynomial

𝑓* 𝑥 = 𝑎% + 𝑎'𝑥 + 𝑎(𝑥 ( + ⋯ + 𝑎* 𝑥 *

If we divide by 𝑥 − 𝑡, we will have a one-order lower


polynomial
𝑓*H' 𝑥 = 𝑏' + 𝑏(𝑥 + 𝑏M𝑥 ( + ⋯ + 𝑏* 𝑥 *H'

with a remainder 𝑅 = 𝑏%

𝑏* = 𝑎*
𝑏D = 𝑎D + 𝑏DE'𝑡 𝑓𝑜𝑟 𝑖 = 𝑛 − 1 𝑡𝑜 0
Allowing for complex roots
Let’s still consider a general polynomial

𝑓* 𝑥 = 𝑎% + 𝑎'𝑥 + 𝑎(𝑥 ( + ⋯ + 𝑎* 𝑥 *

We divide by 𝑥 ( − 𝑟𝑥 − 𝑠, we will have a two-order lower


polynomial
𝑓*H( 𝑥 = 𝑏( + 𝑏M𝑥 + 𝑏`𝑥 ( + ⋯ + 𝑏* 𝑥 *H(

with a remainder 𝑅 = 𝑏' 𝑥 − 𝑟 + 𝑏%


𝒃𝒏 = 𝒂𝒏 , 𝒃𝒏H𝟏 = 𝒂𝒏H𝟏 + 𝒓𝒃𝒏
𝒃𝒊 = 𝒂𝒊 + 𝒓𝒃𝒊E𝟏 + 𝒔𝒃𝒊E𝟐 𝒇𝒐𝒓 𝒊 = 𝒏 − 𝟐 𝒕𝒐 𝟎
How to minimize R?
For a pefect guess of root, 𝑅 = 𝑏' 𝑥 − 𝑟 + 𝑏% = 0
That means 𝑏%= 𝑏'=0
From here, things look like Newton-Raphson. Let’s expand 𝑏%
and 𝑏' using a Taylor series.

𝜕𝑏' 𝜕𝑏'
𝑏' 𝑟 + ∆𝑟, 𝑠 + ∆𝑠 = 𝑏' + ∆𝑟 + ∆𝑠
𝜕𝑟 𝜕𝑠
𝜕𝑏% 𝜕𝑏%
𝑏% 𝑟 + ∆𝑟, 𝑠 + ∆𝑠 = 𝑏% + ∆𝑟 + ∆𝑠
𝜕𝑟 𝜕𝑠
How to minimize R?
𝜕𝑏' 𝜕𝑏'
𝑏' 𝑟 + ∆𝑟, 𝑠 + ∆𝑠 = 𝑏' + ∆𝑟 + ∆𝑠
𝜕𝑟 𝜕𝑠
𝜕𝑏% 𝜕𝑏%
𝑏% 𝑟 + ∆𝑟, 𝑠 + ∆𝑠 = 𝑏% + ∆𝑟 + ∆𝑠
𝜕𝑟 𝜕𝑠
We now somehow “magically” solve this system of two
equations to obtain ∆𝑟 and ∆𝑠.
Note we try to achieve: 𝑏'= 𝑏% = 0.
Obtaining ∆𝑟 and ∆𝑠
𝒄𝒏 = 𝒃 𝒏
𝒄𝒏H𝟏 = 𝒃𝒏H𝟏 + 𝒓𝒄𝒏
𝒄𝒊 = 𝒃𝒊 + 𝒓𝒄𝒊E𝟏 + 𝒔𝒄𝒊E𝟐 𝒇𝒐𝒓 𝒊 = 𝒏 − 𝟐 𝒕𝒐 𝟏

If we replace above 𝑐D s in the system of two equations, it will


be easy to solve.

𝒄𝟐 ∆𝒓 + 𝒄𝟑 ∆𝒔 = −𝒃𝟏
𝒄𝟏 ∆𝒓 + 𝒄𝟐 ∆𝒔 = −𝒃𝟎
Example
User Bairstow’s method with initial guesses of 𝑟 = 𝑠 = −1 to
determine a root of the following polynomial.

𝑓w 𝑥 = 𝑥 w − 3.5𝑥 ` + 2.75𝑥 M + 2.125𝑥 ( − 3.875𝑥 + 1.25


Example
𝑓w 𝑥 = 𝑥 w − 3.5𝑥 ` + 2.75𝑥 M + 2.125𝑥 ( − 3.875𝑥 + 1.25

We start with calculating b and c values.

𝑏w = 𝑎w = 1
𝑏` = 𝑎` − 𝑏w = −4.5
𝑏M = 𝑎M + 𝑟𝑏` + 𝑠𝑏w = 6.25
𝑏( = 𝑎( + 𝑟𝑏M + 𝑠𝑏` = 0.375
𝑏' = −10.5
𝑏% = 11.375
Example
𝑓w 𝑥 = 𝑥 w − 3.5𝑥 ` + 2.75𝑥 M + 2.125𝑥 ( − 3.875𝑥 + 1.25

We start with calculating b and c values.

𝑐w = 𝑏w = 1
𝑐` = 𝑏` + 𝑟𝑐w = −5.5
𝑐M = 10.75
𝑐( = −4.875
𝑐' = −16.375
Example
Now that we have b and c values, let’s put together the
simultaneous equations.
𝑐(∆𝑟 + 𝑐M∆𝑠 = −𝑏'
𝑐'∆𝑟 + 𝑐(∆𝑠 = −𝑏%

−4.875∆𝑟 + 10.75∆𝑠 = 10.5


−16.375∆𝑟 − 4.875∆𝑠 = −11.375
Which gives us ∆𝑟 = 0.3558 and ∆𝑠 = 1.1381.
𝑟 𝑛𝑒𝑤 = −1 + 0.3558 = −0.6442
𝑠 𝑛𝑒𝑤 = −1 + 1.1381 = 0.1381
Example
If we continue for a few iterations, we will converge to the
following root estimates.

𝑟 = −0.5
𝑠 = 0.5

𝑥 ( − 𝑟𝑥 − 𝑠 = 𝑥 ( + 0.5𝑥 − 0.5

−0.5 ± −0.5 ( − 4(1)(−0.5)


𝑥= = 0.5, −1.0
2(1)

You might also like