Numerical Methods: Convergence, Zeros, Deflation, and Approximation, Study notes of Mathematics

Material Type: Notes; Class: INTRO NUM ANALYS & COMPUT; Subject: Mathematics; University: San Diego State University; Term: Unknown 2009;

Typology: Study notes

Pre 2010

Uploaded on 03/28/2010

koofers-user-ty4
koofers-user-ty4 🇺🇸

10 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Accelerating Convergence
Zeros of Polynomials
Deflation, uller’s Method
Polynomial Approximation
Numerical Analysis and Computing
Lecture Notes #04 Solutions of Equations in One Variable,
Interpolation and Polynomial Approximation Accelerating
Convergence; Zeros of Polynomials; Deflation; uller’s Method;
Lagrange Polynomials; Neville’s Method
Peter Blomgren,
Department of Mathematics and Statistics
Dynamical Systems Group
Computational Sciences Research Center
San Diego State University
San Diego, CA 92182-7720
http://terminus.sdsu.edu/
Fall 2009
Peter Blomgren, h[email protected]i#4: Solutions of Equations in One Variable (1/57)
Accelerating Convergence
Zeros of Polynomials
Deflation, uller’s Method
Polynomial Approximation
Outline
1Accelerating Convergence
Review
Aitken’s 2Method
Steffensen’s Method
2Zeros of Polynomials
Fundamentals
Horner’s Method
3Deflation, uller’s Method
Deflation: Finding All the Zeros of a Polynomial
uller’s Method Finding Complex Roots
4Polynomial Approximation
Fundamentals
Moving Beyond Taylor Polynomials
Lagrange Interpolating Polynomials
Neville’s Method
Peter Blomgren, h[email protected]i#4: Solutions of Equations in One Variable (2/57)
Accelerating Convergence
Zeros of Polynomials
Deflation, uller’s Method
Polynomial Approximation
Review
Aitken’s 2Method
Steffensen’s Method
Introduction
“It is rare to have the luxury of quadratic convergence.”
(Burden-Faires, p.83)
There are a number of methods for squeezing faster convergence out of
an already computed sequence of numbers.
We here explore one method which seems the have been around since the
beginning of numerical analysis... Aitken’s 2method. It can be used
to accelerate convergence of a sequence that is linearly convergent,
regardless of its origin or application.
A review of modern extrapolation methods can be found in:
“Practical Extrapolation Methods: Theory and Applications,” Avram
Sidi, Number 10 in Cambridge Monographs on Applied and Compu-
tational Mathematics, Cambridge University Press, June 2003. ISBN:
0-521-66159-5
Peter Blomgren, h[email protected]i#4: Solutions of Equations in One Variable (3/57)
Accelerating Convergence
Zeros of Polynomials
Deflation, uller’s Method
Polynomial Approximation
Review
Aitken’s 2Method
Steffensen’s Method
Recall: Convergence of a Sequence
Definition
Suppose the sequence {pn}
n=0 converges to p, with pn6=pfor all
n. If positive constants λand αexists with
lim
n→∞ |pn+1 p|
|pnp|α=λ
then {pn}
n=0 converges to pof order α, with asymptotic error
constant λ.
Linear convergence means that α= 1, and |λ|<1.
Peter Blomgren, h[email protected]i#4: Solutions of Equations in One Variable (4/57)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Numerical Methods: Convergence, Zeros, Deflation, and Approximation and more Study notes Mathematics in PDF only on Docsity!

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Numerical Analysis and Computing

Lecture Notes #04 — Solutions of Equations in One Variable,Interpolation and Polynomial Approximation — AcceleratingConvergence; Zeros of Polynomials; Deflation; M¨

uller’s Method;

Lagrange Polynomials; Neville’s Method

Peter Blomgren,

[email protected]

Department of Mathematics and Statistics

Dynamical Systems Group Computational Sciences Research Center^ San Diego State UniversitySan Diego, CA 92182-7720^ http://terminus.sdsu.edu/

Fall 2009

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (1/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Outline

1

Accelerating Convergence^ Review^ Aitken’s ∆

2 Method

Steffensen’s Method 2

Zeros of Polynomials^ Fundamentals^ Horner’s Method 3

Deflation, M¨

uller’s Method

Deflation: Finding All the Zeros of a Polynomial M¨uller’s Method — Finding Complex Roots 4

Polynomial Approximation^ Fundamentals^ Moving Beyond Taylor Polynomials^ Lagrange Interpolating Polynomials^ Neville’s Method^ Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (2/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Introduction

“It is rare to have the luxury of quadratic convergence.”

(Burden-Faires, p.83)

There are a number of methods for squeezing faster convergence out ofan^

already computed sequence

of numbers.

We here explore one method which seems the have been around since thebeginning of numerical analysis...

Aitken’s ∆

2 method

. It can be used

to accelerate convergence of a sequence that is linearly convergent,regardless of its origin or application.A review of modern extrapolation methods can be found in:^ “Practical Extrapolation Methods:

Theory and Applications,”

Avram

Sidi, Number 10 in Cambridge Monographs on Applied and Compu-tational Mathematics, Cambridge University Press, June 2003.

ISBN:

0-521-66159-5^ Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (3/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Recall: Convergence of a Sequence

Definition Suppose the sequence

{p

∞}n n

converges to

p, with

pn

p^

for all

n. If positive constants

λ^

and

α

exists with

lim n→∞

|pn

+^

−^ p

|pn

p|

α^

=^

λ

then

{p

}n ∞ n=

converges to

p^

of order

α, with asymptotic error

constant

λ.

Linear convergence means that

α^

= 1, and

|^ <

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (4/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Aitken’s ∆

2 Method

I/II

Assume

{p

}n ∞ n=

is a

linearly convergent sequence

with limit

p.

Further, assume we are far out into the tail of the sequence (

n

large), and the signs of the successive errors agree,

i.e.

sign

(pn

p) =

sign

(pn

p) =

sign

(pn

p) =

and that

pn+

p

pn+

p^

≈^

pn+

p pn^

−^

p^

≈^

λ^

(the asymptotic limit)

This would indicate

(pn

p)

(p

n+

p)(

pn^

−^

p)

(^2) p n+

2 p

n+

p^ +

(^2) p

pn

pn^

−^

(pn

+^

+^ p

)pn

(^2) p

We solve for

p^

and get...

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (5/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Aitken’s ∆

2 Method

II/II

We solve for

p^

and get...

p^ ≈

pn+

pn^

−^

(^2) p n+

pn+

2 p

n+

pn

A little bit of algebraic manipulation put this into the classicalAitken form:

ˆpn^

=^

p^ =

pn

(pn

pn

pn+

2 p

n+

pn

Aitken’s ∆

2 Method is based on the assumption that the ˆ

pn^

we

compute from

pn

,^ p

n+

and

pn

is a better approximation to the

real limit

p.

The analysis needed to

prove

this is beyond the scope of this class, see

e.g.

Sidi’s book. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (6/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Aitken’s ∆

2 Method

The Recipe

Given a sequence finite

{p

}n Nn=

or infinite

{q

∞}n n

sequence

which converges linearly to some limit.Define the new sequences

ˆpn^

=^

pn^

−^

(pn

pn

pn+

2 p

n+

pn

,^

n^ = 0

,^1 ,... ,

N^

−^

or

ˆqn^

=^

qn^

−^

(qn

qn

qn+

2 q

n+

qn

,^

n^ = 0

,^1 ,... ,

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (7/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

ReviewAitken’s

(^2) ∆ Method

Steffensen’s Method

Aitken’s ∆

2 Method

Example

Consider the sequence

{p

∞}n n

, where the sequence is generated by the=

fixed point iteration

pn

+^

= cos(

p),n

p^0

= 0.

Iteration

pn^

ˆpn

0

1

28010361467617

2

3665164585231

3

6906294340474

4

8050421371664

5

93480358742566

8636096881655

6

01368773622757

8876582817136

7

63959682900654

8992243027034

8

22102425026708

42511328159

9

50417761763761

65949599941

10

1404042422510

76383318956

11

44237354900557

1177259563

12

5604740436347

3333909684

Note:

Bold digits are correct; ˆ

p^11

needs

p^13

, and ˆ

p^12

additionally needs

p^14

.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (8/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Zeros of Polynomials

Definition: Degree of a Polynomial A^

polynomial of degree

n^

has the form

P(

x) =

an

n^ x

+^

an−

x 1 n−

a^1

x^ +

a^0

,^

an^

where the

ai

’s are constants (either real, or complex) called the

coefficients

of

P

Why look at polynomials? — We’ll be looking at the problem P(

x) = 0 (

i.e. f

(x

) = 0 for a special class of functions.)

Polynomials are the basis for many approximation methods, hencebeing able to solve polynomial equations fast is valuable.We’d like to use Newton’s method, so we need to compute

P

(x)

and

P

′(x

) as efficiently as possible. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (13/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Fundamentals

Theorem (The Fundamental Theorem of Algebra) If P

(x)

is a polynomial of degree n

with real or complex

coefficients, then P

(x) = 0

has at least one (possibly complex)

root. The proof is surprisingly(?) difficult and requires understanding ofcomplex analysis... We leave it as an exercise for the motivatedstudent!

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (14/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Key Consequences of the Fundamental Theorem of Algebra

1 of 2

Corollary If^ P

(x) is a polynomial of degree

n^

≥^

1 with real or complex

coefficients then there exists unique constants

x^1

,^ x

,^2

,^ x

k

(possibly complex) and unique positive integers

m

,^1

m^2

,^...

,^ m

k

such that

ki=

m

=i n^

and

P(

x) =

an

(x^

−^ x

m) 1 1 (x

x^2

m)

(x

xk

m) k

The collection of zeros is unique. —

m

are the multiplicities of the individual zeros.i

A

polynomial

of

degree

n

has

exactly

n

zeros,

counting

multiplicity. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (15/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Key Consequences of the Fundamental Theorem of Algebra

2 of 2

Corollary Let

P

(x) and

Q

(x) be polynomials of degree at most

n. If

x^1

,^ x

,^ x

, withk

k^

>^

n^ are

distinct

numbers with

P

(xi

Q

(xi

) for

i^ = 1

,^2 ,... ,

k, then

P

(x) =

Q

(x) for all values of

x.

If two polynomials of degree

n^

agree at at least (

n^ + 1) points,

then they must be the same. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (16/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Horner’s Method: Evaluating Polynomials Quickly

1 of 3

Let

P(

x) =

an

n^ x +^ a

n−

x 1 n−

a^1

x^ +

a^0

If we are looking to evaluate

P

(x^0

) for any

x^0

, let

bn^

=^

a,n

bk^

=^

ak^

+^ b

k+

x,^0

k^ = (

n^ −

,^ (n

1 ,^

then

b^0

P

(x^0

). We have only used

n^

multiplications and

n

additions.At the same time we have computed the decomposition

P(

x) = (

x^ −

x^0

)Q

(x) +

b^0

where

Q(

x) =

n−

1 ∑ k=

bk+

k^ x

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (17/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Horner’s Method: Evaluating Polynomials Quickly

2 of 3

Huh?!? Where did the expression come from? — Consider

P(

x)^

=^

axn

n^ +

an

−^1

nx −^1

a^1

x^ +

a^0

=^

(an

n−x

an

−^1

n−x

+^

a)^1

x^ +

a^0

=^

((a

xn n−

an

−^1

nx −^3

+^ · · ·

)x

a^1

)x^

+^

a^0

=^

︸^ ︷︷

n−

1

axn

an

−^1

︸^

︷︷^

bn−

1

)x^

+^

)x

a^1

)x^

+^

a^0

Horner’s method is “simply” the computation of this parenthesizedexpression from the inside-out...

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (18/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Horner’s Method: Evaluating Polynomials Quickly

3 of 3

Now, if we need to compute

P

′(x

) we have 0

′ P

(x)

∣∣∣∣x=

x^0

x^ −

x^0

)Q

′(x

Q

(x)

∣∣∣∣x=

x^0

=^

Q(

x)^0

Which we can compute (again using Horner’s method) in (

n^ −

multiplications and (

n^ −

  1. additions.

Proof?

We really ought to prove that Horner’s method works. It

basically boils down to lots of algebra which shows that thecoefficients of

P

(x) and (

x^ −

x^0

)Q

(x) +

b^0

are the same...

A couple of examples may be more instructive...

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (19/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsHorner’s Method

Example#1: Horner’s Method

For

P

(x) =

(^4) x

(^3) x

(^2) x

x^

−^

1, compute

P

x^0

a^4

a^3

=^

−^1

a^2

a^1

a^0

=^

−^1

b^4

x^0

bx^3

bx^2

b^1

x^0

=^

b^4

b^3

b^2

b^1

b^0

=^

Hence,

P

(^5 ) =

, and

P(

x) = (

x^ −

(^3) x

(^2) x

x^ + 106) + 529

Similarly we get

P

Q

x^0

a^3

a^2

a^1

a^0

bx^3

b^2

x^0

bx^1

b^3

b^2

b^1

b^0

=^

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (20/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Quality of Deflation

Now, the big question is

“are the approximate roots

ˆr^1

,^ ˆr

,^2

ˆrn^

good approximations of the roots of

P

(x)

Unfortunately, sometimes,

no

In each step we solve the equation to some tolerance,

i.e.

( |b k)| 0

tol

Even though we may solve to a tight tolerance (

−^8

), the errors

accumulate and the inaccuracies increase iteration-by-iteration... Question:

Is deflation therefore useless???

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (25/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Improving the Accuracy of Deflation

The problem with deflation is that the zeros of

Q

(xk ) are not good

representatives of the zeros of

P

(x), especially for high

k’s.

As

k^

increases, the quality of the root ˆ

rk^

decreases.

Maybe there is a way to get all the zeros with the same quality?The idea is quite simple... in each step of deflation, instead of justaccepting ˆ

rk^

as a root of

P

(x), we re-run Newton’s method on the

full polynomial

P

(x), with ˆ

rk^

as the starting point — a couple of

Newton iterations should quickly converge to the root of the fullpolynomial.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (26/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Improved Deflation — Algorithm Outline

Algorithm Outline: Improved Deflation 1.

Apply Newton’s method to

P

(x)

→^

ˆr,^1

Q

(x 1

For

k^

,^3 ,... ,

(n

  1. do

Apply Newton’s method to

Q

k−^1

ˆr

∗,^ k

∗Q k (x).

Apply Newton’s method to

P

(x) with

∗ ˆr k as the initial point

ˆrk Apply Horner’s method to

Q

k−

(x 1 ) with

x^

=^

ˆrk^

Q

(xk

Use the quadratic formula on

Q

n−

(x 2 ) to get the two remaining

roots. Note:

“Inside” Newton’s method, the evaluations of polynomi-als and their derivatives are also performed using Horner’smethod. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (27/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Deflation & Improvement

Wilkinson Polynomials

The Wilkinson Polynomials

W P n (x

n∏^ ( k=

x^ −

k)

have the roots

{^1

,^2 ,... ,

n}

, but provide surprisingly tough

numerical root-finding problems.

(Additional details in

Math 543

In the next few slides we show the results of Deflation andImproved Deflation applied to Wilkinson polynomials of degree 9,10, 12, and 13.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (28/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Deflation & Improvement

WP 9

x) and

P

W( 10

x)

0

2

4

6

8

10

−8^10 −10 10 −12 10 −14 10 −16 10

Relative Error of the Computed Roots DeflationImproved

0

2

4

6

8

10

−8^10 −10 10 −12 10 −14 10

Relative Error of the Computed Roots DeflationImproved

Figure:

[Left]

The result of the two algorithms on the Wilkinson polynomial of degree

9; in this case the roots are computed so that

( |b k)|^0

<^10

−^6.

[Right]

The result of

the two algorithms on the Wilkinson polynomial of degree 10; in this case the roots arecomputed so that

( |b k)|^0

<^10

−^6.

In both cases the

lower line

corresponds to

improved

deflation

and we see that we get an improvement in the relative error of several orders of magnitude.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (29/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Deflation & Improvement

WP 12

(x

) and

P

W( 13

x)

0

2

4

6

8

10

12

−6 10 −8 10 −10 10 −12 10 −14 10 −16 10

Relative Error of the Computed Roots DeflationImproved

0

2

4

6

8

10

12

14

−4^10 −6 10 −8 10 −10 10 −12 10 −14 10 −16 10

Relative Error of the Computed Roots DeflationImproved

Figure:

[Left]

The result of the two algorithms on the Wilkinson polynomial of degree

12; in this case the roots are computed so that

( |b k)|^0

<^10

−^4.

[Right]

The result of

the two algorithms on the Wilkinson polynomial of degree 13; in this case the roots arecomputed so that

( |b k)|^0

<^10

−^3.

In both cases the

lower line

corresponds to

improved

deflation

and we see that we get an improvement in the relative error of several orders of magnitude.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (30/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

What About Complex Roots???

One interesting / annoying feature of polynomials with realcoefficients is that they may have complex roots,

e.g.

P(

x) =

(^2) x

  • 1 has the roots

i,^

i}. Where by definition

i^ =

If the initial approximation given to Newton’s method is real, allthe successive iterates will be real... which means we will not findcomplex roots.One way to overcome this is to start with a complex initialapproximation and do all the computations in complex arithmetic.Another solution is

uller’s Method

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (31/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

M¨uller’s Method

M¨uller’s method is an extension of the Secant method...Recall that the secant method uses two points

xk

and

xk

−^1

and

the function values in those two points

f^ (

x) andk^

f^ (

xk−

). The 1

zero-crossing of the linear interpolant (the secant line) is used asthe next iterate

xk

M¨uller’s method takes the next logical step: it uses

three points

x,k^

xk

−^1

and

xk

−^2

, the function values in those points

f^ (

x),k^

f^ (x

k−

) and 1

f^ (

xk−

); a second degree polynomial fitting these 2

three points is found, and its zero-crossing is the next iterate

xk

Next slide:

f^ (

x) =

(^4) x

3 x

xk

−^2

xk

−^1

xk

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (32/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Now We Know “Everything” About Solving

f^ (

x) = 0 !?

Let’s recap... Things to remember...The relation between

root finding

(f

(x

) = 0) and

fixed point

(g^

(x) =

x).

Key algorithms for root finding: Bisection, Secant Method, and Newton’s Method

. — Know what they are (the updates), how to

start (one or two points? bracketing or not bracketing the root?),can the method break, can breakage be fixed? Convergenceproperties.Also, know the mechanics of the Regula Falsi method, andunderstand why it can run into trouble.Fixed point iteration: Under what conditions do FP-iterationconverge for all starting values in the interval?

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (37/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Recap, continued...

Basic error analysis: order

α, asymptotic error constant

λ. —

Which one has the most impact on convergence? Convergencerate for general fixed point iterations?Multiplicity of zeros: What does it mean? How do we use thisknowledge to “help” Newton’s method when we’re looking for azero of high multiplicity?Convergence acceleration: Aitken’s ∆

2 -method. Steffensen’s

Method.Zeros of polynomials: Horner’s method, Deflation (withimprovement), M¨

uller’s method.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (38/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

Deflation: Finding All the Zeros of a PolynomialM¨uller’s Method — Finding Complex Roots

Homework #3 — Due 10/2/2009, 12-noon

Final Version

(Part-1)Implement Steffensen’s method in matlab (or other language).Apply to

g^ (

x) = 1 + (sin(

x))

2 ,^

p^0

= 1, and compute the first 5

iterates.(Part-2)Implement M¨

uller’s method in matlab (or other language). Use to

solve

BF-2.6.7bce

, but go up to accuracy 10

−^8

. Turn in your

code for M¨

uller’s method, and the iteration tables

{x

,^ k f^ (x

)}k nk=

for all methods.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (39/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

New Favorite Problem:

Interpolation and Polynomial Approximation

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (40/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Weierstrass Approximation Theorem

The following theorem is the basis for polynomial approximation: Theorem (Weierstrass Approximation Theorem) Suppose f

C^

[a,

b]

. Then

∀ǫ >

∃^ a polynomial P

(x) :

|f^ (

x)^

−^ P

(x)

|^ < ǫ,

∀x

[a

,^ b

].

Note:

The bound is

uniform

,^ i.e.

valid for all

x^

in the interval.

Note:

The theorem says nothing about how to find the polyno-mial, or about its order. Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (41/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Illustrated: Weierstrass Approximation Theorem

0

2

4

6

8

10

2.5^2 1.5^1 0.5^0 −0.5^

f f+ ε f− ε

Figure:

Weierstrass approximation Theorem guarantees that we (maybe with sub- stantial work) can find a polynomial which fits into the “tube” around the function f^ , no matter how thin we make the tube.^ Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (42/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Candidates: the Taylor Polynomials???

Natural Question:

Are our old friends, the Taylor Polynomials, good candidatesfor polynomial interpolation? Answer:

No.

The Taylor expansion works very hard to be accurate in the neighborhood of

one point

.^

But we want to fit data at

many points (in an extended interval). [Next slide: The approximation is great near the expansion point x^0

= 0, but get progressively worse at we get further away from the point, even for the higher degree approximations.]

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (43/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Taylor Approximation of

x e on the Interval [

,^ 3]

0

0.^

1

1.^

2

2.^

3

20 15 10 5 0

e^x P_0(x) P_1(x) P_2(x) P_3(x) P_4(x) P_5(x)

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (44/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

The

th n Lagrange Interpolating Polynomial We use

Ln

(,k x),

k^

n^

as building blocks for the Lagrange

interpolating polynomial:

P(

x) =

n∑ k=

f^ (x

)Lk n,k

(x

which has the property

P(

x) =i^

f^ (

x)i^

,^

∀i^

n.

This is the unique polynomial passing through the points (xi

,^ f^

(xi

i^ = 0

n.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (49/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Error bound for the Lagrange interpolating polynomial

Suppose x

,^ ii

n are distinct numbers in the interval

[a

,^ b

],

and f

C^

n+

[a,

b]

. Then

∀x

[a

,^ b

]^ ∃

ξ(

x)^

∈^ (

a,^

b)^

so that:

f^ (x

PLagrange

(x) +

(f (^) n+1)

(ξ(

x))

(n^

n∏^ ( i=

x^ −

xi^

where P

Lagrange

(x

)^ is the n

th^

Lagrange interpolating polynomial.

Compare with the error formula for Taylor polynomials

f^ (x

PTaylor

(x) +

(f (^) n+1)

(ξ(

x)) (n^

(x^

−^

x)^0

n+

Problem:

Applying the error term may be difficult... Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (50/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

The Lagrange and Taylor Error Terms

Just to get a feeling for the non-constant part of the error terms inthe Lagrange and Taylor approximations, we plot those parts onthe interval [

,^ 4] with interpolation points

xi

i,^

i^ = 0

,^1 ,... ,

0

0.^

1

1.^

2

2.^

3

3.^

4

(^43210) −1 −2 −3 −

0

0.^

1

1.^

2

2.^

3

3.^

4

1200 1000 800 600 400 200 0

Figure:

[Left]

The non-constant error terms for the Lagrange interpolation oscillates in the interval [

−^4 ,

4]

(and takes the value

zero

at the node point

x), andk^

[Right]

the non-constant error term for the Taylor

extrapolation grows in the interval [

,^ 1024].

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (51/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Practical Problems

Applying (estimating) the error term is difficult.The degree of the polynomial needed for some desired accuracy isnot known until after cumbersome calculations — checking theerror term. If we want to increase the degree of the polynomial (to e.g. n^ + 1

) the previous calculations are not of any help... Building block for a fix:

Let

f^

be a function defined at

x^0

xn

and suppose that

m

,^ m 1

m

arek

k^

n) distinct integers,

with 0

m

≤i n^

∀i. The Lagrange polynomial that agrees with

f^ (x

) the

k^

points

xm

,^ x 1 m^2

xm

, is denotedk

Pm

,m 1

,..., 2

mk^

(x

Note:

{m

,^ m 1

mk

0 ,^

n}

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (52/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Increasing the degree of the Lagrange Interpolation

Theorem Let f be defined at x

,^ x 0

xk

, and x

and xi

be two distinctj

points in this set, thenP

(x) =

(x^

−^ x

)Pj

0 ,...,

j−^1

,j+

,...,

(xk

)^ −

(x

xi^

)P

0 ,...,

i−^1

,i+

,...,

(xk

xi^

−^

xj

is the k

th^

Lagrange polynomial that interpolates f at the k

points x

xk

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (53/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Recursive Generation of Higher Degree Lagrange Interpolating Polynomials

x^0

P^0

x^1

P^1

P^0

,^1

x^2

P^2

P^1

,^2

P^0

,^1 ,^2

x^3

P^3

P^2

,^3

P^1

,^2 ,^3

P^0

,^1 ,^2

,^3

x^4

P^4

P^3

,^4

P^2

,^3 ,^4

P^1

,^2 ,^3

,^4

P^0

,^1 ,^2

,^3 ,^4

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (54/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Neville’s Method

The notation in the previous table gets cumbersome... Weintroduce the notation

Q

Last,Degree

PLast–Degree,

...^

,Last

, the table

becomes:

x^0

Q^0

,^0 x^1

Q^1

,^0

Q^1

,^1

x^2

Q^2

,^0

Q^2

,^1

Q^2

,^2

x^3

Q^3

,^0

Q^3

,^1

Q^3

,^2

Q^3

,^3

x^4

Q^4

,^0

Q^4

,^1

Q^4

,^2

Q^4

,^3

Q^4

,^4

Compare with the old notation:

x^0

P^0 x^1

P^1

P^0 ,

1

x^2

P^2

P^1 ,

2

P^0 ,

1 ,^2

x^3

P^3

P^2 ,

3

P^1 ,

2 ,^3

P^0 ,

1 ,^2 ,

3

x^4

P^4

P^3 ,

4

P^2 ,

3 ,^4

P^1 ,

2 ,^3 ,

4

P^0 ,

1 ,^2 ,

3 ,^4

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (55/57)

Accelerating Convergence

Zeros of Polynomials Deflation, M¨

uller’s Method Polynomial Approximation

FundamentalsMoving Beyond Taylor PolynomialsLagrange Interpolating PolynomialsNeville’s Method

Algorithm: Neville’s Method — Iterated Interpolation

Algorithm: Neville’s Method To evaluate the polynomial that interpolates the

n^

  • 1 points

(xi

,^ f^ (xi

i^ = 0

n^

at the point

x:

Initialize

Q

i,^0

=^

f^ (x

).i

FOR

i^

n

FOR

j^

i

Qi

= ,j

(x^

−^

xi−

)Qj

i,j−

(x

xi^

)Q

i−^1

,j−

1

xi^

−^

xi−

j

END

END

Output the

Q

-table.

Peter Blomgren,

[email protected]

〉^

#4: Solutions of Equations in One Variable

— (56/57)