Вы находитесь на странице: 1из 22

Mtodos Numricos

Mtodo de la Falsa-Posicin

Introduccin
f x

f ( x) 0

(1)

Mtodo de Biseccin:
f xU

f ( xL ) * f ( xU ) 0 (2)

xL xU
xr
2

Exact root

xL

O
2

xr

f xL

xU

(3)
1

Figura 1 Mtodo de Falsa-Posicin


http://numericalmethods.eng.usf.edu

Mtodo de Falsa-Posicin
Basedo en tringulos similares, mostrado en Figura 1,
tenemos:

f ( xU )
f ( xL )

xr xL xr xU

(4)

Los signos para ambos lados of Eq. (4):

f ( xL ) 0; xr xL 0
f ( xU ) 0; xr xU 0
3

http://numericalmethods.eng.usf.edu

De la Eq. (4), obtenemos

xr xL f xU xr xU f xL
xU f xL xL f xU xr f xL f xU
De resolver la ecuacin anterior obtenemos la prxima
prediccin de la raz xr

xU f xL xL f xU
xr
f xL f xU
4

(5)

http://numericalmethods.eng.usf.edu

De la ecuacin de arriba,

f xU xL xU
xr xU
f xL f xU

f xL
xr x L
f xU f xL

xU xL

(6)

(7)

http://numericalmethods.eng.usf.edu

Step-By-Step False-Position
Algorithms
1. Choose x L and xU as two guesses for the root such
that

f xL f xU 0

xU f xL xL f xU
2. Estimate the root, xm
f xL f xU

3. Now check the following


(a) If f xL f xm 0 , then the root lies between
and xm ; then xL xL and xU xm

xL

(b) If f xL f xm 0 , then the root lies between xm


xU
and xU ; then xL xm and xU http://numericalmethods.eng.usf.edu

(c) If f xL f xm 0 , then the root is


Stop the algorithm if this is true.

xm .

4. Find the new estimate of the root

xU f xL xL f xU
xm
f xL f xU

Find the absolute relative approximate error as

xmnew xmold
a
100
new
xm
7

http://numericalmethods.eng.usf.edu

where
new
m =
old
m =

x
x

estimated root from present iteration


estimated root from previous iteration

3
say

10
0.001. If a s , then go to step 3,
5.
s
else stop the algorithm.

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 xm ,shown in steps
#2 and 4!
8

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 x to which the ball is
submerged under water is given by
4

x 0.165x 3.993 10 0
3

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 x 2R
0 x 2(0.055)
0 x 0.11
Figure 2 :
Floating ball
problem
10

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

Let us assume

xL 0, xU 0.11
f xL f 0 0 0.1650 3.993 10 4 3.993 10 4
3

f xU f 0.11 0.11 0.1650.11 3.993 10 4 2.662 10 4


3

Hence,

f xL f xU f 0 f 0.11 3.993 104 2.662 104 0


11

http://numericalmethods.eng.usf.edu

Iteration 1
xU f x L x L f xU
xm
f x L f xU

0.11 3.993 10 4 0 2.662 10 4

3.993 10 4 2.662 10 4
0.0660
3
2
f xm f 0.0660 0.0660 0.1650.0660 3.993 104

3.1944 10

f xL f xm f 0 f 0.0660 0
12

xL 0, xU 0.0660

http://numericalmethods.eng.usf.edu

Iteration 2
xU f x L x L f xU
xm
f x L f xU

0.0660 3.993 10 4 0 3.1944 10 5

3.993 10 4 3.1944 10 5
0.0611

f xm f 0.0611 0.0611 0.1650.0611 3.993 104


3

1.1320 105
f xL f xm f 0 f 0.0611 0
13

Hence,

xL 0.0611, xU 0.0660

http://numericalmethods.eng.usf.edu

0.0611 0.0660
a
100 8%
0.0611

Iteration 3
xU f x L x L f xU
xm
f x L f xU

0.0660 1.132 10 5 0.0611 3.1944 10 5

1.132 10 5 3.1944 10 5
0.0624

14

http://numericalmethods.eng.usf.edu

f xm 1.1313 107

f xL f xm f 0.0611 f 0.0624 0

Hence,

xL 0.0611, xU 0.0624
0.0624 0.0611
a
100 2.05%
0.0624

15

http://numericalmethods.eng.usf.edu

3
2
4

f
x

0
.
165
x

3
.
993

10
0
Table 1: Root of

for False-Position Method.


Iteration

16

xL

xU

xm

a %

f xm

0.0000

0.1100

0.0660

N/A

-3.1944x10-5

0.0000

0.0660

0.0611

8.00

1.1320x10-5

0.0611

0.0660

0.0624

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 2m
0.02 0.5 10
0.04 10

2 m

2 m

log( 0.04) 2 m
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 4th iteration
is 3.

17

http://numericalmethods.eng.usf.edu

References
1. S.C. Chapra, R.P. Canale, Numerical Methods for
Engineers, Fourth Edition, Mc-Graw Hill.

18

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

Вам также может понравиться