L5-Roots Finding (Polynomials)
L5-Roots Finding (Polynomials)
NUMERICAL METHODS
Roots of Polynomials
f ( x ) a ( x x2 ) 2 b ( x x2 ) c
2. The parabola should intersect the three points [xo, f(xo)], [x1, f(x1)], [x2, f(x2)].
The coefficients of the polynomial can be estimated by substituting three
points to give
f ( xo ) a ( xo x2 ) 2 b( xo x2 ) c
f ( x1 ) a( x1 x2 ) 2 b( x1 x2 ) c
f ( x2 ) a ( x2 x2 ) 2 b ( x2 x2 ) c
3. Three equations can be solved for three unknowns, a, b, c. Since two of the
terms in the 3rd equation are zero, it can be immediately solved for
c f ( x2 )
f ( xo ) f ( x2 ) a ( xo x2 ) 2 b( xo x2 )
f ( x1 ) f ( x2 ) a ( x1 x2 ) 2 b( x1 x2 )
To solve for a and b, we define a number of differences:
h o x1 - x o h1 x 2 - x1
f ( x1 ) f ( xo ) f ( x2 ) f ( x1 )
o 1
x1 xo x2 x1
( ho h1 )b ( ho h1 ) 2 a ho o h11
Solved for a
h1b h12 a h11 and b
1 o
a b ah1 1 c f ( x2 )
h1 ho
The intersection point with the x-axis is the root of the parabola
which we can find using the quadratic formula.
x3: root estimate
f ( x3 ) a ( x3 x 2 ) 2 b ( x 3 x 2 ) c 0
b b 2 4ac
x3 x 2
2a
If b2 4ac the difference in the numerator can be very small,
This may increase round-off errors.
• Roots can be found by applying an alternative form of quadratic
formula:
b b 2 4ac 2c
2a b b 2 4ac
2c
x3 x 2
b b 2 4ac
• ±term yields two roots, the sign is chosen to agree with the sign of
b. This will result in a largest denominator, and will give root
estimate that is closest to x2.
Calculate b b 2 4ac and b b 2 4ac and choose the largest
• Once x3 is determined, the process is repeated using the
following guidelines:
xi 1 xi
a s
x i 1
x2
x1 x2 x1
x0 x2 x1
Example: Use Müller’s method with guesses of x0=4.5,
x1=5.5 and x2=5 to determine a root of the equation
f ( x ) x 13x 12
3
εs=10-5
x*=4
Example: Use Müller’s method to determine the roots of
f ( x) 2 x 6 x 8
3
εs=10-5
Complex roots found in conjugate pairs
xr1 0.5 j1.9365 , xr 2 0.5 j1.9365
( x (0.5 j1.9365))( x (0.5 j1.9365)) x 2 x 4
f ( x ) 2 x 3 6 x 8 0 f ( x ) x 3 3x 4 0
x 1
x 2 x 4 x 3 0 x 2 3x 4 xr 3 1
x3 x2 4 x
x2 x 4
x2 x 4
0