Introduction to Fourier Series

advertisement

Numerical Methods

Part: False-Position Method of

Solving a Nonlinear Equation

http://numericalmethods.eng.usf.edu

For more details on this topic

Go to http://numericalmethods.eng.usf.edu

Click on Keyword

Click on False-Position Method of Solving a

Nonlinear Equation

You are free

 to Share – to copy, distribute, display and perform the work to Remix – to make derivative works

Under the following conditions

Attribution — You must attribute the work in the manner specified by the author or licensor

(but not in any way that suggests that they endorse you or your use of the work).

Noncommercial — You may not use this work for commercial purposes.

Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.

4/13/2020

Lecture # 1

Chapter 03.06: False-Position

Method of Solving a Nonlinear

Equation

Major: All Engineering Majors

Authors: Duc Nguyen http://numericalmethods.eng.usf.edu

Numerical Methods for STEM undergraduates http://numericalmethods.eng.usf.edu

5

Introduction

f f

 

U f ( x )

0

In the Bisection method

(1) f ( x

L

) * f ( x

U

)

0

(2)

6

O x

L

Exact root f

 

L x r x r

 x

L

 x

U

2 x

U x 1

Figure 1 False-Position Method http://numericalmethods.eng.usf.edu

(3)

7

False-Position Method

Based on two similar triangles, shown in Figure 1, one gets: x r f (

 x

L x

)

L

 x r f (

 x

U x

U

)

(4)

The signs for both sides of Eq. (4) is consistent, since: f f

(

( x

L

)

0 ; x

U

)

0 ; x r x r

 x

L

 x

U

0

0 http://numericalmethods.eng.usf.edu

8

From Eq. (4), one obtains x

U

 x r f

 x

L x

U

 

L

 x

L f

 

U

 x r x r

 f x

U

  

L

   

L f

U

The above equation can be solved to obtain the next predicted root x r

, as x r

 x

U f f

  x

L

   

L

 x f

L f x

U

 

U

(5) http://numericalmethods.eng.usf.edu

9

The above equation, x r

 x

U

 f f

 

U x

U

   

L x

L f

U

 or x r

 x

L

 f x

U f

 

L

   

L x

U

 x

L

 http://numericalmethods.eng.usf.edu

(6)

(7)

Step-By-Step False-Position

Algorithms

10

1. Choose that x

L and f x

U as two guesses for the root such

   

L f

U

0

2. Estimate the root, x m

3. Now check the following x

U f f

  x

L

   

L

 x f

L f x

U

 

U

(a) If

   

L and x m

; then

(b) If f f x m

L

   

L and x

U

; then x m

L

 x x

0

0

L m

, then the root lies between x and x

U x m

, then the root lies between and x

U x x

L m

(c) If f

   

L f m

0 , then the root is

Stop the algorithm if this is true.

x m

.

11

4. Find the new estimate of the root x m

 x

U f f

 

L

 x

L f

   

L f x

U

 

U

Find the absolute relative approximate error as

 a

 new x m

 x m new old x m

100 http://numericalmethods.eng.usf.edu

where x m new

= estimated root from present iteration x m old = estimated root from previous iteration

5.

say

 s

10

3 

0 .

001 .

If  a else stop the algorithm.

 s

, then go to step 3,

12

Notes: The False-Position and Bisection algorithms are quite similar. The only difference is the formula used to calculate the new estimate of the root

#2 and 4!

x m

, shown in steps http://numericalmethods.eng.usf.edu

Example 1

The floating ball has a specific gravity of 0.6 and has a radius of 5.5cm.

You are asked to find the depth to which the ball is submerged when floating in water.

The equation that gives the depth submerged under water is given by x to which the ball is x

3 

0 .

165 x

2 

3 .

993

10

4 

0

13

Use the false-position method of finding roots of equations to find the depth x to which the ball is submerged under water. Conduct three iterations to estimate the root of the above equation. Find the absolute relative approximate error at the end of each iteration, and the number of significant digits at least correct at the converged iteration.

http://numericalmethods.eng.usf.edu

Solution

From the physics of the problem

0

0

0

 x x x

2

2 (

0

R

0 .

055 )

.

11

14

Figure 2 :

Floating ball problem x water http://numericalmethods.eng.usf.edu

Let us assume x

L

0 , x

U

0 .

11 f f

 

 f

   

3

L

0 .

165

 

U

 f

0 .

11

 

0 .

11

3 

 

2 

0 .

165

3 .

993

0 .

11

2

10

4 

3 .

993

3 .

993

10

4

10

4

2 .

662

10

4

15

Hence, f

   

L x

U

 f

  

0 .

11

3 .

993

10

4



2 .

662

10

4

0 http://numericalmethods.eng.usf.edu

16 f

Iteration 1 x m

 x

U f f

  x

L

   

L

 x f

L f x

U

 

U

0 .

11

3 .

993

3 .

993

10

10

4

4

0

2 .

2 .

662

662

10

4

10

4

  m

 f

0 .

0660

0 .

0660

 

0 .

0660

3 

0 .

165

0 .

0660

2 

3 .

993

10

4

 

3 .

1944

10

5 f

   

 f

      

0

L x m

0 .

0660 x

L

0 , x

U

0 .

0660 http://numericalmethods.eng.usf.edu

17

Iteration 2 f x m

 x

U f f

  x

L

   

L

 x f

L f x

U

 

U

0 .

0660

3 .

993

3 .

993

10

10

4 

4

0

3 .

1944

3 .

1944

10

5

10

5

0 .

0611

  m

 f

0 .

0611

 

0 .

0611

3 

0 .

165

0 .

0611

2 

3 .

993

10

4

 f

1 .

1320

   

L m

 f

10

5

  

0 .

0611

   

0

Hence, x

L

0 .

0611 , x

U

0 .

0660 http://numericalmethods.eng.usf.edu

18

 a

0 .

0611

0 .

0660

100

8 %

0 .

0611

Iteration 3 x m

 x

U f f

  x

L

   

L

 x f

L f x

U

 

U

0 .

0660

1 .

132

10

5

1 .

132

10

5 

0 .

0611

3 .

1944

3 .

1944

10

5

10

5

0 .

0624 http://numericalmethods.eng.usf.edu

19

Hence, f

  m

 

1 .

1313

10

7 f

   

L x m

 f

0 .

0611

 

0 .

0624

   

0 x

L

0 .

0611 , x

U

0 .

0624

 a

0 .

0624

0 .

0611

100

0 .

0624

2 .

05 % http://numericalmethods.eng.usf.edu

20

2

3

4

Table 1: Root of f

 x

3 

0 .

165 x for False-Position Method.

2 

3 .

993

10

4 

0

Iteration

1 x

L

0.0000

x

U

0.1100

x m

0.0660

 a

% f

  m

N/A -3.1944x10

-5

0.0000

0.0611

0.0660

0.0660

0.0611

0.0624

8.00

1.1320x10

-5

2.05

-1.1313x10

-7

0.0611

0.0624

0.0632377619

0.02

-3.3471x10

-10 http://numericalmethods.eng.usf.edu

 a

0 .

5

10

2

 m

0 .

02

0 .

5

10

2

 m

0 .

04

10

2

 m log( m

0 .

04 )

2

 m

2

 log( 0 .

04 ) m

2

(

1 .

3979 ) m

3 .

3979

So , m

3

The number of significant digits at least correct in the estimated root of 0.062377619 at the end of 4 th iteration is 3.

21 http://numericalmethods.eng.usf.edu

22

References

1. S.C. Chapra, R.P. Canale, Numerical Methods for

Engineers, Fourth Edition, Mc-Graw Hill.

http://numericalmethods.eng.usf.edu

THE END

http://numericalmethods.eng.usf.edu

Acknowledgement

This instructional power point brought to you by

Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu

Committed to bringing numerical methods to the undergraduate

For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/

This material is based upon work supported by the National

Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

The End - Really

Download