MATH 175: Numerical Analysis II

Download Report

Transcript MATH 175: Numerical Analysis II

MATH 175: Numerical
Analysis II
Lecturer: Jomar Fajardo Rabajante
IMSP, UPLB
1st Sem AY 2012-2013
Other Method: Bairstow’s Method
• A special problem associated with polynomials Pn(x) is
the possibility of complex roots. Newton's method, the
secant method, and Muller's method all can find complex
roots if complex arithmetic is used and/or complex initial
approximations are specified. Fortunately, complex
arithmetic is available in several programming languages,
such as FORTRAN and SCILAB.
• However, hand calculation using complex arithmetic is
tedious and time consuming. When polynomials with real
coefficients have complex roots, they occur in conjugate
pairs, which corresponds to a quadratic factor of the
polynomial Pn(x). Bairstow's method extracts quadratic
factors from a polynomial using only real arithmetic.
Other Method: Bairstow’s Method
Given a polynomial:
Pn ( x )  a n x  a n 1 x
n
n 1
 ...  a 0
We can factor a quadratic factor:
Pn ( x )  ( x  rx  s )( b n x
2
 b1 ( x  r )  b 0 
n 2
 b n 1 x
n3
 ...  b 2 )
Quotient term
Remainder term
Other Method: Bairstow’s Method
Pn ( x )  ( x  rx  s )( b n x
2
n 2
 b n 1 x
n3
 ...  b 2 )
 b1 ( x  r )  b 0 
What we want to do is make the remainder=0, and find
the correct r and s. Then use quadratic formula!!!
After getting the correct factor, do synthetic division or
long division to get the other factors (of course you can
do Bairstow’s again if necessary.)
Other Method: Bairstow’s Method
FORMULA:
(Derivation omitted)
User input:
r0  ?
s0  ?
bn  a n
b n 1  a n 1  rk b n

b n  2  a n  2  rk b n 1  s k b n
b n  3  a n  3  rk b n  2  s k b n 1

b 0  a 0  rk b1  s k b 2
Other Method: Bairstow’s Method
c n  bn
c n 1  b n 1  rk c n

c n  2  b n  2  rk c n 1  s k c n
c n  3  b n  3  rk c n  2  s k c n 1

c1  b1  rk c 2  s k c 3
 c 2  r  c 3  s   b1

 c1  r  c 2  s   b 0
rk  1  rk   rk
s k 1  s k   s k
Other Method: Bairstow’s Method
Stopping criteria: (choose one, or you can use both)
 rk  tol 1 and
 s k  tol 1
b1, k 1  b1, k  tol 2 and
b 0 , k 1  b 0 , k  tol 2
See Scilab syntax for example (in MS Word file).
Other Methods:
• Laguerre’s Method
• Jenkins-Traub Method
• Brent’s Method - uses a superlinear method (i.e., inverse
quadratic interpolation) and monitors its behavior to
ensure that it is behaving properly. If not, some interval
halving steps are used to ensure at least linear behavior
until the root is approached more closely, at which time
the procedure reverts to the superlinear method. Brent's
method does not require evaluation of the derivative. This
approach combines the efficiency of open methods with
the robustness of closed methods.
Other Methods:
• Graeffe’s Method - an algorithm for finding all of the
roots of a polynomial.
• Eigenvalues of Companion Matrix
• Etc. etc. etc….
NOW, let’s discuss Wilkinson’s Polynomial…
Wilkinson’s Polynomial
• Wilkinson's polynomial is a
specific polynomial which was used by James H.
Wilkinson in 1963 to illustrate a difficulty
when finding the root of a polynomial: the
location of the roots can be very sensitive to
perturbations in the coefficients of the
polynomial.
• In 1984, he described the personal impact of this
discovery:
“Speaking for myself I regard it as the most
traumatic experience in my career as a
numerical analyst.”
Wilkinson’s Polynomial
So what are the roots?
Wilkinson’s Polynomial
Wilkinson’s Polynomial
• If the coefficient of x19 is changed from −210 to
−210.0000001192, then the polynomial value
w(20) decreases from 0 to −6.25×1017, and the
root at x = 20 grows to x ≈ 20.8. Actually, other
roots are also greatly displaced.
• The change to the coefficient is tiny, and this illconditioning is rampant when using computers.
Stability Analysis must be done to check if the
function is well-conditioned or ill-conditioned
(stability analysis in root-finding will not be
discussed).
Wilkinson’s Polynomial
END OF CHAPTER 1
Next topics: (these are optional topics in our
course outline)
-Solving Nonlinear Systems (using
Newton’s Method) and
-Numerical Optimization (using Goldensection Search and Newton’s Method)