24 views

Uploaded by varunsingh214761

Open Methods for root finding

Open Methods for root finding

© All Rights Reserved

- Grade4 Regional Individual Finals 2005G4
- MA6459 Numerical Methods
- Newton Raphson Method
- Unit-9
- Book Answer Key (Autosaved)
- Age
- Chapter 06
- 10_InverseKinematics
- 2004 Int Ansys Conf 54
- C-PROGRAM
- ME3215_FinalProject_F15
- TRIAL MATH M 950-2 2015 Jong Srawak
- slides adaptive control
- L(09)
- 2011-P4-Math-SA1-Rosyth
- NA
- etrial5
- Basic Matlab
- New
- Lect8 Property Conv Part2

You are on page 1of 58

CE-401

Open Methods

Bracketing methods are based on assuming an

interval of the function which brackets the root.

The bracketing methods always converge to the

root.

Open methods are based on formulas that

require only a single starting value of x or two

starting values that do not necessarily bracket

the root.

These method sometimes diverge from the true

root.

the left side of the equation:

f ( x) 0 g ( x) x

xi 1 g ( xi )

Fixed-point methods may sometime diverge,

depending on the stating point (initial guess) and

how the function behaves.

Examples:

1. f ( x) x 2 x 2

x0

g ( x) x 2 2

or

g ( x) x 2

or

2.

3.

3.

2

g ( x) 1

x

f(x) = x 2-2x+3 x = g(x)=(x2+3)/2

f(x) = sin x x = g(x)= sin x + x

f(x) = e-x- x x = g(x)= e-x

x = g(x) can be

expressed as a pair of

equations:

y1= x

y2= g(x). (component

equations)

Plot them separately.

Fixed-point iteration converges if :

g (x ) 1

error of the previous step, therefore it is

called linearly convergent.

1. Rearrange the equation f(x) = 0 so that x is

on the left hand side and g(x) is on the right

hand side.

e.g f(x) = x2-2x-1 = 0 x= (x2-1)/2

g(x) = (x2-1)/2

3. Evaluate g(xi)

4. Let xi+1 = g(xi)

5. Find a=(Xi+1 xi)/Xi+1, and set xi at xi+1

6. Repeat steps 3 through 5 until |a|<= s

f(x) = e-x - x

f(x)

f(x)=e-x - x

2. Thus, the formula predicting the

new value of x is: xi+1 = e-xi

3. Guess xo = 0

4. The iterations continues till the

limiting value

Root

f(x)

f1(x) = x

g(x) = e-x

i

xi

g(xi)

0

1

2

3

4

5

6

7

8

9

10

0

1.0

0.367879

0.692201

0.500473

0.606244

0.545396

0.579612

0.560115

0.571143

0.564879

1.0

0.367879

0.692201

0.500473

0.606244

0.545396

0.579612

0.560115

0.571143

0.564879

a%

t%

100

171.8

46.9

38.3

17.4

11.2

5.90

3.48

1.93

1.11

76.3

35.1

22.1

11.8

6.89

3.83

2.2

1.24

0.705

0.399

i

xi

g(xi)

0

1

2

3

4

5

6

7

8

9

10

0

1.0

0.367879

0.692201

0.500473

0.606244

0.545396

0.579612

0.560115

0.571143

0.564879

1.0

0.367879

0.692201

0.500473

0.606244

0.545396

0.579612

0.560115

0.571143

0.564879

a%

t%

100

171.8

46.9

38.3

17.4

11.2

5.90

3.48

1.93

1.11

76.3

35.1

22.1

11.8

6.89

3.83

2.2

1.24

0.705

0.399

Example

Start

Input: xo , s, maxi

i=0

a=1.1s

1

while

a< s &

i >maxi

x n g x 0

False

i i 1

xn=0

True

x n xo

100%

xn

x0=xn

Stop

Based on Taylor series expansion:

2

x

f ( xi 1 ) f ( xi ) f ( xi )x f ( xi )

...

2!

The root is the value of xi 1 when f(xi 1 ) 0

Solve for

Rearranging,

0 f(xi ) f (xi )( xi 1 xi )

f ( xi ) Newton-Raphson formula

xi 1 xi

f ( xi )

initial point xi is extended f(x)

till it meets the x-axis at f(xi)

the improved estimate of

Slope f /(xi)

f(x)

the root xi+1.

x

Root

xi+1

The iterations continues

xi

till the approx. error

f ( xi ) 0

/

f ( xi )

reaches a certain limiting

xi xi 1

value.

f ( xi )

xi 1 xi

f / ( xi )

Use the Newton-Raphson method to find the

root of e-x-x= 0 f(x) = e-x-x and f`(x)= -e-x-1;

thus

x

x

f ( xi )

e x

e x

xi 1 xi /

xi x

xi x

f ( xi )

e 1

e 1

Iter.

0

1

2

3

4

xi

0

0.5

0.566311003

0.567143165

0.567143290

t%

100

11.8

0.147

0.00002

<10-8

Start

Input: xo , s, maxi

i=0

a=1.1s

1

while

a >s &

i <maxi

xn x0

False

f x 0

f

'

x 0

i i 1

xn=0

True

x n xo

100%

xn

x0=xn

Stop

function [root,ea,iter]=newtraph(func, dfunc, xr, es, maxit, varargin)

% newtraph: Newton-Raphson root location zeroes

% [root,ea,iter]=newtraph(func,dfunc,xr,es,maxit,p1,p2,...):

% uses Newton-Raphson method to find the root of func

% input:

% func = name of function

% dfunc = name of derivative of function

% xr = initial guess

% es = desired relative error (default = 0.0001%)

% maxit = maximum allowable iterations (default = 50)

% p1,p2,... = additional parameters used by function

% output:

% root = real root

% ea = approximate relative error (%)

% iter = number of iterations

if nargin<3,error('at least 3 input arguments required'),end

if nargin<4|isempty(es),es=0.0001;end

if nargin<5|isempty(maxit),maxit=50;end

iter = 0;

while (1)

xrold = xr;

xr = xr - func(xr)/dfunc(xr);

iter = iter + 1;

if xr ~= 0, ea = abs((xr - xrold)/xr) * 100; end

if ea <= es | iter >= maxit, break, end

end

root = xr;

convergence.

a) Reflection point

c) Near zero slope , and

d) zero slope

Evaluate 29 to five decimal places by NewtonRaphsons iterative method

Solution

Evaluate 29 to five decimal places by NewtonRaphsons iterative method

Solution

The derivative f / ( x i ) is

sometimes difficult to evaluate

by the computer program. It

may be replaced by a backward

finite divided difference

f (x i ) f (x i 1 )

f (x i )

x i x i 1

/

predicting the xi+1 is:

xi 1

f ( xi )( xi 1 xi )

xi

f ( xi 1 ) f ( xi )

xo, x1.

However, because f(x) is not required to change

signs between estimates, it is not classified as a

bracketing method.

Newtons method. Convergence is not

guaranteed for all xo, x1, f(x).

Determine a root of the equation sin x + 3 cos x 2 = 0

using the secant method. The initial approximations

x0 and x1 are 0 and 1.5.

Secant Methods

False Position

x r xu

f (x u )(x l x u )

f (x l ) f (x u )

Secant Method

x i 1 x i

f (x i )(x i 1 x i )

f (x i 1 ) f (x i )

f(x) must changes signs between xl f(x) is not required to change signs

between xi and xi-1

and xu

Xr replaces whichever of the original

values yielded a function value with

the same sign as f(xr)

Xi+1 replace xi

Xi replace xi-1

Always converge

May be diverge

case the secant converges.

Position

Secant Methods

f(x)=logex. Start computation with xl= xi-1=0.5, xu=xi = 5.

1.

False position method

Iter

1

2

3

xl

0.5

0.5

0.5

xu

5.0

1.8546

1.2163

xr

1.8546

1.2163

1.0585

Secant method

2.

Iter

xi-1

xi

0.5

5.0

1.8546

xi+1

1.8546

-0.10438

Comparison of

the true percent

relative Errors Et

for the methods

to the determine

the root of

f(x)=e-x-x

Start

i=0

a=1.1s

1

while

a >s &

i < maxi

x i 1 x i

f (x i )(x i 1 x i )

f (x i 1 ) f (x i )

False

Print: xi , f(xi) ,a , i

i i 1

Xi+1=0

True

x i 1 x i

100%

x i 1

Xi-1=xi

Xi=xi+1

Stop

Rather than using two initial values, an alternative

approach is using a fractional perturbation of the

/

f

independent variable to estimate (x i )

f (x i x i ) f (x i )

f (x i )

xi

/

x i 1

x i f (x i )

xi

f (x i x i ) f (x i )

Use the modified secant method to find the root of

f(x) = e-x-x and, x0=1 and =0.01

First Iteration

x 0 1

f x 0 0.63212

x 0 x 0 1.01

f x 0 x 0 0.64578

x 1 x i 1 x i

x i f (x i )

0.537263

f (x i x i ) f (x i )

t 5.3%

Second Iteration

x 1 0.537263

x 1 x 1 0.542635

f x 1 0.047083

f x 1 x 1 0.038579

x i f (x i )

x 2 x i 1 x i

0.56701

f (x i x i ) f (x i )

t 0.0236%

Multiple Roots

f(x)= (x-3)(x-1)(x-1)(x-1)

= x4- 6x3+ 125 x2- 10x+3

f(x)= (x-3)(x-1)(x-1)

= x3- 5x2+7x -3

f(x)

f(x)

Double roots

1

triple roots

3

x

Multiple Roots

where a function is tangent to the x axis.

Difficulties

- Function does not change sign with double

(or even number of multiple root), therefore,

cannot use bracketing methods.

- Both f(x) and f(x)=0, division by zero with

Newtons and Secant methods which may

diverge around this root.

Ralston and Rabinowitz

Another u(x) is introduced such that u(x)=f(x)/f /(x);

Getting the roots of u(x) using Newton Raphsons

technique:

This function has roots

at all the same locations

as the original function

u ( xi )

xi 1 xi /

u ( xi )

/

/

//

f

(

x

)

f

(

x

)

f

(

x

)

f

( xi )

/

i

i

i

u ( xi )

[ f / ( xi )]2

xi 1 xi

f ( xi ) f ( xi )

/

( xi ) f ( xi ) f // ( xi )

Using the Newton Raphson and Modified Newton

Raphson evaluate the multiple roots of

f(x)= x3-5x2+7x-3 with an initial guess of x0=0

Newton Raphson formula:

xi 1

f ( xi )

xi3 5 xi2 7 xi 3

xi /

xi

f ( xi )

3 xi2 10 x 7

xi 1 xi

f ( xi ) f / ( xi )

( x ) f ( x ) f

2

//

( xi )

xi

(3 xi2 10 xi 7) 2 ( xi3 5 xi2 7 xi 3)(6 xi 10)

Newton Raphson

Iter

xi

0

0

1

0.4286

2

0.6857

3

0.83286 17

4

0.91332 8.7

5

0.95578 4.4

6

0.97766 2.2

t%

100

57

31

Modified Newton-Raphson

iter

xi

t%

0

0

100

1

1.10526

11

2

1.00308

0.31

3

1.000002

00024

true value of 1.0 while the Modified Newton Raphson is

quadratically converging.

For simple roots, modified Newton Raphson is less efficient

and requires more computational effort than the standard

Newton Raphson method

f1(x1,x2,.,xn)=0

f2 (x1,x2,.,xn)=0

fn (x1,x2,.,xn)=0

The solution is a set of x values that

simultaneously get the equations to zero.

Example: x2 + xy = 10 & y + 3xy2 = 57

u(x,y) = x2+ xy -10 = 0

v(x,y) = y+ 3xy2 -57 = 0

u(x,y)=0 and v(x,y)=0

methods for solving single equation; Fixed point

iteration and Newton-Raphson. (we will only discuss

the Newton Raphson)

2. Newton Raphson Method

2. Newton Raphson Method

2. Newton Raphson Method

x 2+ xy =10 and y + 3xy 2 = 57

are two nonlinear simultaneous equations with two unknown x and y they can

be expressed in the form: use the point (1.5,3.5) as initial guess.

u

u

2 x y,

x

x

y

v

v

3y2 ,

1 6 xy

x

y

i

xi

yi

Ui

Vi

ui,x

ui,y

vi,x

vi,y

1.5

3.5

-2.5

1.625

6.5

1.5

36.75

32.5

2.03603

2.84388

-.06435

-4.7560

6.91594

2.03603

24.26296

35.74135

1.9987

3.00229

a,x

a,y

26.3

23.1

1.87

5.27

2. Newton Raphson Method

i

xi

yi

Ui

Vi

ui,x

ui,y

vi,x

vi,y

1.5

3.5

-2.5

1.625

6.5

1.5

36.75

32.5

2.03603

2.84388

-.06435

-4.7560

6.91594

2.03603

24.26296

35.74135

1.9987

3.00229

a,x

a,y

26.3

23.1

1.87

5.27

Problem

The polynomial f (x) = x3 -6x2 +11x- 6.1 has a real root

between 3 and 5. Apply the Newton-Raphsons method to

this function using an initial guess of x0 = 3.5. Explain your

results

Problem

The polynomial f (x) = x3 -6x2 +11x- 6.1 has a real root

between 3 and 5. Apply the Newton-Raphsons method to

this function using an initial guess of x0 = 3.5. Explain your

results

Problem

The polynomial f (x) = x3 -6x2 +11x- 6.1 has a real root

between 3 and 5. Apply the Newton-Raphsons method to

this function using an initial guess of x0 = 3.5. Explain your

results

The polynomial f (x) = x3 -6x2 +11x- 6.1 has a real root

between 3 and 5. Apply the Newton-Raphsons method to

this function using an initial guess of x0 = 3.5. Explain your

results

Problem

Find the root of polynomial f (x) = x3 -6x2 +11x- 6.1. Apply

the Secants method to this function using an initial guess

of x-1= 2.5 and x0 = 3.5.

Problem

Find the root of polynomial f (x) = x3 -6x2 +11x- 6.1. Apply

the Secants method to this function using an initial guess

of x-1= 2.5 and x0 = 3.5.

Problem

Find the root of polynomial f (x) = x3 -6x2 +11x- 6.1. Apply

the Secants method to this function using an initial guess

of x-1= 2.5 and x0 = 3.5.

- Grade4 Regional Individual Finals 2005G4Uploaded byJose Barrera Galera
- MA6459 Numerical MethodsUploaded bySekar Dinesh
- Newton Raphson MethodUploaded byBernard Jomari Blancada Razote
- Unit-9Uploaded byAtharva Kelkar
- Book Answer Key (Autosaved)Uploaded byLuke Matthews Bernardo
- Chapter 06Uploaded bySara Afzal
- 10_InverseKinematicsUploaded bychrajnaag
- ME3215_FinalProject_F15Uploaded bysteven
- AgeUploaded byJagannath Jaggu
- 2004 Int Ansys Conf 54Uploaded bymalarmanic
- TRIAL MATH M 950-2 2015 Jong SrawakUploaded bymasyati
- slides adaptive controlUploaded byRameez Hayat
- C-PROGRAMUploaded byVinduja Karthika
- L(09)Uploaded bykhalid
- 2011-P4-Math-SA1-RosythUploaded byjapoy
- NAUploaded byAhmad Ibrahim Ridhwan
- etrial5Uploaded byMuralee Veeramalai
- Basic MatlabUploaded byMuzamil Ahamed
- NewUploaded byVaibhav Agrawal
- Lect8 Property Conv Part2Uploaded byHardik Awasthi
- Rbl Report1Uploaded byShrikant Kumbhar
- bnlpsioptUploaded byRaja Selvaraj
- Chapter 4Uploaded byVenkata Reddy
- penaltyParameter.pdfUploaded byPercy Paz
- 06ChicagoPPT[1]Uploaded bySatyendra Dubey
- 08-3d Beam ElementUploaded byAntonellaCorrado
- -49-2-NagyUploaded byStanislaw Nagy
- big-oUploaded byprasadkvss
- persistent-survey (1).psUploaded byMardokay Mosazghi
- Plugin-Complete MI TutorialUploaded byArunava Chakravarty

- Hot_SpotUploaded byvarunsingh214761
- 1-s2.0-S2095756417303185-mainUploaded byvarunsingh214761
- Precipitation fluctuations in the Himalaya and its vicinity An analysis based on temperature records from Nepal_2000.pdfUploaded byvarunsingh214761
- A Study on the Method for Cleaning and Repairing the Probe Vehicle DataUploaded byvarunsingh214761
- Lecture 04Uploaded byvarunsingh214761
- Essays on Geography and GIS, Volume 1Uploaded byEsri
- IMPORTANT_Traffic Sensing Through AccelerometersUploaded byvarunsingh214761
- 1-s2.0-S1364815207001867-mainUploaded byvarunsingh214761
- Total Station and Its Applications in Surveying - GIS ResourcesUploaded byvarunsingh214761
- Ramp MeteringUploaded byvarunsingh214761
- Advice Leaflet SCOOTUploaded byvarunsingh214761
- Nearest Neighbour algorithmUploaded byvarunsingh214761
- CBNT Practical Problem1_CodeUploaded byvarunsingh214761
- Analysis in GISUploaded byvarunsingh214761
- Lecture 05 1Uploaded byvarunsingh214761
- Lecture 11Uploaded byvarunsingh214761
- THESIS Algorithm for Detection of Hot Spots of Traffic Through Analysis of GPS DataUploaded byEndless Love
- Finalppt Revised 30-04-2018Uploaded byvarunsingh214761
- ITS Benefits and Cost ConsiderationUploaded byvarunsingh214761
- Lecture_01.pptUploaded byvarunsingh214761
- Lecture 17 Vehicle Routing Problem LectureUploaded byvarunsingh214761
- Lecture 16 Arc Routing ProblemUploaded byvarunsingh214761
- Lecture 16Uploaded byvarunsingh214761
- Chap_10Uploaded byvarunsingh214761
- enterprise-gis.pdfUploaded byvarunsingh214761
- c371f47805c345fa84d32ac8a675046e.pdfUploaded byvarunsingh214761
- managing-gis-3.pdfUploaded byvarunsingh214761
- geomedicine.pdfUploaded byvarunsingh214761

- Guida a Slic3rUploaded byFrancesco Rossi
- Wire - Wikipedia, The Free EncyclopediaUploaded byBasil Gonsalves
- saclstUploaded byAbraham Imam Muttaqin
- Building Better Casual Theories a Fuzzy Set Approach to TypologiesUploaded byNianxin Wang
- Ten Gb EthernetUploaded byBibinMathew
- D7501.1207483-1Uploaded byLeny Porto
- LTE Performance and Optimization ConsultantUploaded bymalikmdnurani
- 12-02-09 IBM, ESD, and corruption of governmentsUploaded bySELA - Human Rights Alert - Israel
- CPB 20104 Mass Transfer 2 UniKL MICET Experiment 2: Tray Dryer full lab reportUploaded bySiti Hajar Mohamed
- Dm-no.-309-s.-2016 - Call Up on the Submtssion of Enhanced School Tmprovement Plan (Sip)Uploaded byMarvin Go
- Good Governance.docUploaded bySikandar Hayat
- Consortium AgreementUploaded byAshesh Tiwari
- Anthony Burfoot IndictmentUploaded by13News Now
- Finger 1 Project_ERSS Report for Temporary Drain Diversion_23 Sep 2014Uploaded bymypenta2008
- Authority to Sell-AgentsUploaded byYumii Li
- Project PlanningUploaded by5800nokia
- Resume MathanRaj MBAUploaded byMathan Raj
- LeadUploaded byZheiquolicxsSchwarzenegger
- HowtoUploaded byHarvey Bisa
- Travis Bradberry i Jean Greaves Emocionalna InteligencijaUploaded byDragana Pejovic
- zeerasUploaded byAnonymous V9E1ZJtwoE
- joint venture & acquisitionUploaded byManish Gupta
- RCC71 Stair Flight & Landing - SingleUploaded byvntiba
- Lock Out RelayUploaded byFatholla Salehi
- VSAM- Virtual Storage Access MethodUploaded byBalaji Kolukuluri
- Europe Engulfed Rules PDFUploaded bySonia
- A Multidatabase System as 4-Tiered Client-Server Distributed Heterogeneous Database SystemUploaded byijcsis
- AlHabtoorIssue30Uploaded byleniscaptor
- RT-HDUploaded bydiya15
- Table Grape GrowingUploaded bySarah Francis