+ All Categories
Home > Documents > 03 open methods

03 open methods

Date post: 21-Jun-2015
Category:
Upload: mohammad-tawfik
View: 970 times
Download: 5 times
Share this document with a friend
Popular Tags:
26
ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Roots of Nonlinear Equations Open Methods
Transcript
Page 1: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Roots of Nonlinear Equations

Open Methods

Page 2: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Objectives

• Be able to use the fixed point method to find a root of an equation

• Be able to use the Newton Raphson method to find a root of an equations

• Be able to use the Secant method to find a root of an equations

• Write down an algorithm to outline the method being used

Page 3: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Fixed Point Iterations

Page 4: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

kk xgx 1

Fixed Point Iterations

• Solve 0xf

0 xgxxf

• Rearrange terms:

• OR

xgx

Page 5: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

In some cases you do not get a solution!

Page 6: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Example

Page 7: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Example

22 xxxf Which has the solutions -1 & 2

To get a fixed-point form, we may use:

22 xxg

xxg 21 2 xxg

12

22

x

xxg

Page 8: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

First trial!

• No matter how close your initial guess is, the solution diverges!

Page 9: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Second trial

• The solution converges in this case!!

Page 10: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Condition of Convergence

• For the fixed point iteration to ensure convergence of solution from point xk we should ensure that

1' kxg

Page 11: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Fixed Point Algorithm

1. Rearrange f(x) to get f(x)=x-g(x)

2. Start with a reasonable initial guess x0

3. If |g’(x0)|>=1, goto step 2

4. Evaluate xk+1=g(xk)

5. If (xk+1-xk)/xk+1< s; end

6. Let xk=xk+1; goto step 4

Page 12: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Newton-Raphson Method

Page 13: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Newton’s Method: Line Equation

121

21 ' xfxx

yym

The slope of the line is given by:

Page 14: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Newton’s Method: Line equation

121

1 ' xfxx

xf

11

12 ' xf

xfxx

kk

kk xf

xfxx

'1

Newton-RaphsonIterative method

Page 15: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Newton’s Method: Taylor’s Series

1121 ' xfxxxf 11

12 ' xf

xfxx

kk

kk xf

xfxx

'1

Newton-RaphsonIterative method

11212 ' xfxxxfxf

Page 16: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Example

Page 17: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Newton-Raphson Algorithm

1. From f(x) get f’(x)

2. Start with a reasonable initial guess x0

3. Evaluate xk+1=xk-f(xk)/f’(xk)

4. If (xk+1-xk)/xk+1< s; end

5. Let xk=xk+1; goto step 4

Page 18: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Convergence condition!

• Try to derive a convergence conditions similar to that of the fixed point iteration!

Page 19: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Secant Method

Page 20: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Secant Method

21

21

2

2

xx

yy

xx

yy

The line equation is given by:

2

21

221 0xx

yy

yxx

Page 21: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Secant Method

2

21

221 0xx

yy

yxx

21

2122 yy

xxyxx

kk

kkkkk xfxf

xxxfxx

1

11

Page 22: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Secant Algorithm

1. Select x1 and x2

2. Evaluate f(x1) and f(x2)

3. Evaluate xk+1

4. If (xk+1-xk)/xk+1< s; end

5. Let xk=xk+1; goto step 3

Page 23: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Why Secant Method?

• The most important advantage over Newton-Raphson method is that you do not need to evaluate the derivative!

Page 24: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Comparing with False-Position

• Actually, false position ensures convergence, while secant method does not!!!

Page 25: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Conclusion

• The fixed point iteration, Newton-Raphson method, and the secant method in general converge faster than bisection and false position methods

• On the other hand, these methods do not ensure convergence!

• The secant method, in many cases, becomes more practical than Newton-Raphson as derivatives do not need to be evaluated

Page 26: 03 open methods

ENEM602 Spring 2007

Dr. Eng. Mohammad Tawfik

Homework #2

• Chapter 6, p 157, numbers:6.1,6.2,6.3

• Homework due next week


Recommended