che 555 bracketing methods

20
by Lale Yurttas, Texas A&M University Chapter 2 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 ROOTS OF EQUATION: BRACKETING METHODS

Upload: mxr-3

Post on 21-Jul-2016

20 views

Category:

Documents


4 download

TRANSCRIPT

by Lale Yurttas, Texas A&M University

Chapter 2 1

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2ROOTS OF EQUATION:

BRACKETING METHODS

by Lale Yurttas, Texas A&M University

2

Roots of Equations

•Why?

•But

aacbbxcbxax

240

22

?0sin?02345

xxxxfexdxcxbxax

Chapter 2

by Lale Yurttas, Texas A&M University

3

Nonlinear Equation Solvers

Bracketing Graphical Open Methods

BisectionFalse Position (Regula-Falsi)

Newton Raphson

Secant

All Iterative

Chapter 2

by Lale Yurttas, Texas A&M University

Chapter 2 4

BRACKETING METHODS(Or, two point methods for finding roots)

• Two initial guesses for the root are required. These guesses must “bracket” or be on either side of the root.

== > Fig. 5.1

• If one root of a real and continuous function, f(x)=0, is bounded by values x=xl, x =xu then f(xl) . f(xu) <0. (The function changes sign on opposite sides of the root)

Part 1:

GRAPHICAL METHODS

by Lale Yurttas, Texas A&M University

Chapter 2 5

GRAPHICAL METHODS• Simple method – obtain an estimate of

root of equation.• Used to provide visual insight into the

technique.• Make a plot of function & observe the x-

axis cross → rough approximation of the root.

• Limited practical value – not precise.

by Lale Yurttas, Texas A&M University

Chapter 2 6

• Fig. (a) and (c) → f(xl) & f(xu) have same signs – no roots / even number of roots within the interval.

• Fig. (b) and (d) → function have different signs – odd number of roots in the interval

by Lale Yurttas, Texas A&M University

Chapter 2 7

by Lale Yurttas, Texas A&M University

Chapter 2 8

Figure 5.4a

f(x) = sin 10x + cos 3x

Example 1Use the graphical approach to

determine the drag coefficient c needed for a parachutist of mass m=68.1 kg to have a velocity of 40 m/s after free-falling for time t=10 s. (Note: The acceleration due to gravity is 9.8 m/s2)

by Lale Yurttas, Texas A&M University

Chapter 2 9

Part 2: THE BISECTION METHOD

by Lale Yurttas, Texas A&M University

Chapter 2 10

by Lale Yurttas, Texas A&M University

Chapter 2 11

THE BISECTION METHOD• Incremental search method → interval is

always divided in half.• Locating of the interval is where function

changes sign.

Procedures

by Lale Yurttas, Texas A&M University

Chapter 2 12

For the arbitrary equation of one variable, f(x)=01. Choose xl and xu for the root where function

changes sign, check if f(xl).f(xu) < 0.2. Estimate the root, xr by evaluating3. Find the pair

• If f(xl). f(xr) < 0, root lies in the lower interval, then xu= xr and go to step 2.

• If f(xl). f(xr) > 0, root lies in the upper interval, then xl=xr, go to step 2.

• If f(xl). f(xr) = 0, then root is xr and terminate.

2ul

rxxx

by Lale Yurttas, Texas A&M University

Chapter 2 13

4. Compare s with a . If a< s, stop. Otherwise repeat the process.

%100

new

oldnew

a

r

rr

x

xx

%100

valueTrue

valueionApproximatvalueTruea

by Lale Yurttas, Texas A&M University

Chapter 2 14

Evaluation of Method

Pros• Easy• Always find root• Number of iterations

required to attain an absolute error can be computed a priori.

Cons• Slow• Know a and b that

bound root• Multiple roots• No account is taken

of f(xl) and f(xu), if f(xl) is closer to zero, it is likely that root is closer to xl .

Example 2Use bisection method to solve the

same problem approached graphically in Example 1.

by Lale Yurttas, Texas A&M University

Chapter 2 17

THE FALSE-POSITION METHOD

by Lale Yurttas, Texas A&M University

Chapter 2 18

Part 3:

• Also called linear interpolation method.• An alternative based on a graphical

insight.• Alternative method to join f(xl) and f(xu)

by a straight line.• Intersection line with x-axis improved

estimation of root.• Advantages: Faster & always converges for a

single root.by Lale Yurttas, Texas A&M University

Chapter 2 19

THE FALSE-POSITION METHOD

(Regula-Falsi)

by Lale Yurttas, Texas A&M University

Chapter 2 20

Procedures1. Choose xl and xu for the root where

function changes sign, check if f(xl).f(xu) < 0.

2. Estimate the value of the root from the following formula

and evaluate f(xr).

ul

ullur ff

fxfxx

by Lale Yurttas, Texas A&M University

Chapter 2 21

3. Find the pair • If f(xl). f(xr) < 0, root lies in the lower

interval, then xu= xr and go to step 2.• If f(xl). f(xr) > 0, root lies in the upper interval,

then xl=xr, go to step 2.

• If f(xl). f(xr) = 0, then root is xr and terminate.

4. Compare es with ea . If ea< es, stop. Otherwise repeat the process.

@%100

new

oldnew

a

r

rr

x

xx %100

valueTruevalueionApproximatvalueTrue

a

Example 3

by Lale Yurttas, Texas A&M University

Chapter 2 22

Use false-position method to solve the same problem approached graphically in Example 1.