1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced:...

24
1 Roots of Equations Open Methods (Part 2)
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    233
  • download

    2

Transcript of 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced:...

Page 1: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

1

Roots of Equations

Open Methods

(Part 2)

Page 2: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

2

The following root finding methods will be introduced:

A. Bracketing MethodsA.1. Bisection MethodA.2. Regula Falsi

B. Open MethodsB.1. Fixed Point IterationB.2. Newton Raphson's MethodB.3. Secant Method

Page 3: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

3

B.2. Secant MethodNewton-Raphson method needs to compute the derivatives.

The secant method approximate the derivatives by finite divided difference.

)()(

))((

)('

)(

)()()('

1

1

1

1

1

ii

iiii

i

iii

ii

iii

xfxf

xxxfx

xf

xfxx

xx

xfxfxf

)()(

))((

1

11

ii

iiiii xfxf

xxxfxx

From Newton-Raphson

method

Page 4: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

4

Secant Method

Page 5: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

5

Secant Method – ExampleFind root of f(x) = e-x - x = 0 with initial estimate of

x-1 = 0 and x0 = 1.0. (Answer: α= 0.56714329)

)()(

))((

1

11

ii

iiiii xfxf

xxxfxx

i xi-1 xi f(xi-1) f(xi) xi+1 εt

0 0 1 1.00000 -0.63212 0.61270 8.0 %

1 1 0.61270 -0.63212 -0.07081 0.56384 0.58 %

2 0.61270 0.56384 -0.07081 0.00518 0.56717 0.0048 %

Again, compare this results obtained by the Newton-Raphson method and simple fixed point iteration method.

Page 6: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

6

Comparison of the Secant and False-position method

• Both methods use the same expression to compute xr.

• They have different methods for the replacement of the initial values by the new estimate. (see next page)

)()(

))((:position False

)()(

))((:Secant

1

11

ul

uluur

ii

iiiii

xfxf

xxxfxx

xfxf

xxxfxx

Page 7: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

7

Comparison of the Secant and False-position method

Page 8: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

8

Comparison of the Secant and False-position method

xef(x) x

Page 9: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

9

Modified Secant Method

• Replace xi-1 - xi by δxi and approximate f'(x) as

• From Newton-Raphson method,

i

iiii x

xfxxfxf

)()(

)('

)()(

)(

)('

)(

1

1

iii

iiii

i

iii

xfxxf

xfxxx

xf

xfxx

• Needs only one instead of two initial guess points

Page 10: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

10

Modified Secant Method

i xi-1 xi f(xi-1) f(xi) xi+1 εt

0 0 1 1.00000 -0.63212 0.61270 8.0 %

1 1 0.61270 -0.63212 -0.07081 0.56384 0.58 %

2 0.61270 0.56384 -0.07081 0.00518 0.56717 0.0048 %

i xi xi+δxi f(xi) f(xi+δxi) xi+1

0 1 1.01 -0.63212 -0.64578 0.537263

1 0.537263 0.542635 0.047083 0.038579 0.56701

2 0.56701 0.567143 0.000209 -0.00867 0.567143

Find root of f(x) = e-x - x = 0 with initial estimate of

x0 = 1.0 and δ=0.01. (Answer: α= 0.56714329)

Compared with the Secant method

Page 11: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

11

Modified Secant Method – About δ

If δ is too small, the method can be swamped by round-off error caused by subtractive cancellation in the denominator of

If δ is too big, this technique can become inefficient and even divergent.

If δ is selected properly, this method provides a good alternative for cases when developing two initial guess is inconvenient.

)()(

)(1

iii

iiii xfxxf

xfxxx

Page 12: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

12

The following root finding methods will be introduced:

A. Bracketing MethodsA.1. Bisection MethodA.2. Regula Falsi

B. Open MethodsB.1. Fixed Point IterationB.2. Newton Raphson's MethodB.3. Secant Method

Can they handle multiple roots?

Page 13: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

13

Multiple Roots

• A multiple root corresponds to a point where a function is tangent to the x axis.

• For example, this function has a double root.

f(x) = (x – 3)(x – 1)(x – 1)

= x3 – 5x2 + 7x - 3

• For example, this function has a triple root.

f(x) = (x – 3)(x – 1)(x – 1) (x – 1)

= x4 – 6x3 +12x2 - 10x + 3

Page 14: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

14

Multiple Roots

• Odd multiple roots cross the axis. (Figure (b))

• Even multiple roots do not cross the axis. (Figure (a) and (c))

Page 15: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

15

Difficulties when we have multiple roots

• Bracketing methods do not work for even multiple roots.

• f(α) = f'(α) = 0, so both f(xi) and f'(xi) approach zero near the root. This could result in division by zero. A zero check for f(x) should be incorporated so that the computation stops before f'(x) reaches zero.

• For multiple roots, Newton-Raphson and Secant methods converge linearly, rather than quadratic convergence.

Page 16: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

16

Modified Newton-Raphson Methods for Multiple Roots

• Suggested Solution 1:

)('

)()(')(

)()('

~)(

~.rootsingleaisand0)(

~roottheoftymultiplicitheis,

~Define

11

/1

1

/1

1

i

ii

iim

im

i

i

iii

m

xf

xfmx

xfxf

xfx

xf

xfxx

f

mff

m

Disadvantage:

work only when m is known.

Page 17: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

17

Modified Newton-Raphson Methods for Multiple Roots

• Suggested Solution 2:

)(")()]('[

)(')()2(into)3(and)1(Sub

)3()]('[

)(")()(')(')('

~)1(ateDifferenti

)2()('

~)(

~).( as locations same theallat roots has)(

~

)1()('

)()(

~Define

21

2

1

ii

iiii

i

i

iii

xfxfxf

xfxfxx

xf

xfxfxfxfxf

xf

xfxx

xfxfxf

xfxf

Page 18: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

18

Example of the Modified Newton-Raphson Method for

Multiple Roots• Original Newton Raphson method

7103

375

)('

)(

375

)1)(1)(3()(

2

23

1

23

xx

xxxx

xf

xfxx

xxx

xxxxf

i

ii

i xi εt (%)

0 0 100

1 0.4285714 57

2 0.6857143 31

3 0.8328654 17

4 0.9133290 8.7

5 0.9557833 4.4

6 0.9776551 2.2

The method is linearly convergent toward the true value of 1.0.

Page 19: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

19

Example of the Modified Newton-Raphson Method for

Multiple Roots• For the modified algorithm

)106)(375()7103(

)7103)(375(

)(")()]('[

)(')(

375

)1)(1)(3()(

232

223

21

23

iiiiii

iiiiii

ii

iiii

xxxxxx

xxxxxx

xfxfxf

xfxfxx

xxx

xxxxf

i xi εt (%)

0 0 100

1 1.105263 11

2 1.003082 0.31

3 1.000002 0.00024

Page 20: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

20

• How about their performance on finding the single root?

i Standard εt (%) Modified εt (%)

0 4 33 4 33

1 3.4 13 2.636364 12

2 3.1 3.3 2.820225 6.0

3 3.008696 0.29 2.961728 1.3

4 3.000075 0.0025 2.998479 0.05

5 3.000000 2x10-7 2.999998 7.7x10-5

Example of the Modified Newton-Raphson Method for

Multiple Roots

Page 21: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

21

• What's the disadvantage of the modified Newton-Raphson Methods for multiple roots over the original Newton-Raphson method?

• Note that the Secant method can also be modified in a similar fashion for multiple roots.

Modified Newton-Raphson Methods for Multiple Roots

Page 22: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

22

Summary of Open Methods• Unlike bracketing methods, open methods do

not always converge.

• Open methods, if converge, usually converge more quickly than bracketing methods.

• Open methods can locate even multiple roots whereas bracketing methods cannot. (why?)

Page 23: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

23

Study Objectives• Understand the graphical interpretation of a root• Understand the differences between bracketing

methods and open methods for root location• Understand the concept of convergence and

divergence• Know why bracketing methods always converge,

whereas open methods may sometimes diverge• Realize that convergence of open methods is

more likely if the initial guess is close to the true root.

Page 24: 1 Roots of Equations Open Methods (Part 2). 2 The following root finding methods will be introduced: A. Bracketing Methods A.1. Bisection Method A.2.

24

Study Objectives• Understand what conditions make a method

converges quickly or diverges• Understand the concepts of linear and quadratic

convergence and their implications for the efficiencies of the fixed-point-iteration and Newton-Raphson methods

• Know the fundamental difference between the false-position and secant methods and how it relates to convergence

• Understand the problems posed by multiple roots and the modifications available to mitigate them