Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Roots of Nonlinear Equations-Numerical Methods in Engineering-Lecture 10 Slides-Civil Engineering and Geological Sciences, Slides of Numerical Methods in Engineering

Newton-Raphson is based on using an initial guess for the root and finding the intersection with the axis of the straight line which represents the slope at the initial guess. It works very fast and converges assuming the initial guess was good. Roots of Nonlinear Equations, Bisection Method, Problems, Multiple Roots, Double Roots, Singularities, Newton Raphson Method, Derivation, Problems, Newton’s Method, Secant Method

Typology: Slides

2011/2012

Uploaded on 02/20/2012

damyen
damyen 🇺🇸

4.4

(27)

274 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CE 341/441 - Lecture 10 - Fall 2004
p. 10.1
LECTURE 10
SOLVING FOR ROOTS OF NONLINEAR EQUATIONS
Consider the equation
Roots of equation are the values of which satisfy the above expression. Also
referred to as the zeros of an equation
Example 1
Find the roots of
Roots of this function are found by examining the equation
and solving for the values of which satisfy this equality.
fx() 0=
fx() x
x1x2x3x4
x
f(x)
roots of f(x)
fx() 3x52x2x10++=
3x52x2x10++ 0=
x
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Roots of Nonlinear Equations-Numerical Methods in Engineering-Lecture 10 Slides-Civil Engineering and Geological Sciences and more Slides Numerical Methods in Engineering in PDF only on Docsity!

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

LECTURE 10SOLVING FOR ROOTS OF NONLINEAR EQUATIONS • Consider the equation• Roots of equation

are the values of

which satisfy the above expression. Also

referred to as the zeros of an equation

Example 1 • Find the roots of

• Roots of this function are found by examining the equation

and solving for the values of

which satisfy this equality.

f

x (

f

x (

x

x

1

x

2

x

3

x

4

x

f(x)

roots of f(x)

f

x (

x

5

x

2

x

x

5

x

2

x

x

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Example 2 • Solve

• Roots are found by examining the equation

Example 3 • Find

⇒ ⇒

• Find roots by examining the equation

kx

tan

x

kx

tan

x

kx

x

tan

f

x (

kx

x

tan

kx

x

tan

3

x

3

x

3

x

3

f

x (

x

3

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Bisection Method with One Root in a Specified Interval • You know that the root lies in the interval•

= the root that we are looking for

• The midpoint of the starting interval is• Evaluate

. Then consider the product

root

must lie in interval

root

must lie in interval

a

1

b

1

[

]

x

r

a

1

b

1

c

1

x

x

r

f(x)

c

1

a

1

b

1

+^2

f

a

1

f

c

1

(

f

b

1

f

a

1

f

c

1

(

x

r

c

1

b

1

[

]

f

a

1

f

c

1

(

x

r

a

1

c

1

[

]

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

• Selection of the interval is based on the fact that the sign of

changes within the

interval in which the root lies.

• Now reset the interval and repeat the process. Therefore for this case, the second itera-

tion interval becomes

• Now evaluate the midpoint of the second interval as• Evaluate

. Consider the product

root

must lie in interval

root

must lie in interval

f

x (

a

2

b

2

[

]

c

1

b

1

[

]

c

2

a

2

b

2

x

f(x)

b

2

c

2

a

2

f

a

2

f

c

2

(

f

b

2

f

a

2

f

c

2

(

x

r

c

2

b

2

[

]

f

a

2

f

c

2

(

x

r

a

2

c

2

[

]

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

• If you wish to limit the error to

⇒ ⇒ ⇒

• You must apply

iterations to ensure the

level of convergence.

ε

ε

b

1

a

1

n

n

b

1

a

1

-^ ε

n

b

1

a

1

-^ ε

ln

ln

n

b

1

a

1

  • ε

ln

n

ε

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Example 4 • Find the root of

in the interval

• The actual root to this equation is 2.645751. The actual error for our 6

th

iteration esti-

mate is 0.0051.

n

Iteration

±

f

x (

x

2

[

]

a

n

b

n

c

n

f

a

n

f

b

n

(

f

c

n

(

E

i

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

• Singularities

• The bisection method will solve for a singularity as if it were a root. Therefore we

must check the functional values to ensure convergence to see if it is indeed a root.

x

f(x)

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Newton-Raphson Method (a.k.a. Newton Method) • Finds the root if an initial estimate of the root is known• Method may be applied to find complex roots• Method uses a truncated Taylor Series expansion to find the root• Basic Concept

• Slope is known at an estimate of the root

• Compute the slope of

at the estimate of the root,

, and project this slope back

to where it crosses the

x

-axis to find a better estimate for the root.

x

o

f

x (

x

o

x

f(x)

x

1

x

2

x

0

f(x)

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

• The error can be estimated as:• We can iteratively update our estimate of

with our most recently computed value

• The error is equal to

• Note that

is not included to update

but serves only as an estimate of the error.

E

f

2 (

)

x

o

(

f

1 (

)

x

o

(

x

r

x

o

2

x

o

x

n

x

n

1

f

x

n

1

f

1 (

)

x

n

1

E

n

E

n

f

2 (

)

x

n

1

f

1 (

)

x

n

1

x

n

x

n

1

2

E

n

x

n

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Example 5 • Find the root of

using an initial estimate

(up to round-off accuracy of calculator).

n 1

4.6 x 10

f

x (

x

2

x

0

x

n

x

n

1

f

x

n

1

f

1 (

)

x

n

1

E

n

f

2 (

)

x

n

1

f

1 (

)

x

n

1

x

n

x

n

1

2

f

1 (

)

x (

x

f

2 (

)

x (

x

n

1

f

x

n

1

f

1 (

)

x

n

1

f

2 (

)

x

n

1

x

n

E

n

E

actual

x

2 4

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

• If the initial guess is poor (what is poor depends on shape of

• The solution may diverge:• The solution may converge to another root:• Therefore what is a good initial guess depends on the function and how it behaves.

f

x (

x

0

x

1

x

f(x)

x

f(x)

x

0

root you would like to find

root youwill find

CE 341/441 - Lecture 10 - Fall 2004

p. 10.

Secant Method • For cases where it is difficult or expensive to evaluate the first derivative, we can apply

the Newton Method using a difference approximation to evaluate the derivative

• Forward difference approximation

difficult to apply since

is included

• Backward difference approximation

readily applied

• Applying a backward approximation, the

Secant

algorithm to find the root becomes:

x

n

f

1 (

)

x

n

1

f

x

n

(

f

x

n

1

x

n

x

n

1

O x

n

x

n

1

f

1 (

)

x

n

1

f

x

n

2

f

x

n

1

x

n

2

x

n

1

O x

n

2

x

n

1

x

f(x)

x

n

x

n-

x

n-

x

n

x

n

1

f

x

n

1

f

x

n

2

f

x

n

1

x

n

2

x

n

1