1. Trang chủ
  2. » Công Nghệ Thông Tin

A textbook of Computer Based Numerical and Statiscal Techniques part 7 potx

10 452 1

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 119,1 KB

Nội dung

Use the Bisection Method to find out the positive square root of 30 correct to 4 decimal This method is essentially same as the bisection method except that instead of bisecting the inte

Trang 1

PROBLEM SET 2.1

1 Find the smallest root lying in the interval (1, 2) up to four decimal places for the equation

x6 – x4 – x3 – 1 = 0 by Bisection Method [Ans 1.4036]

2 Find the smallest root of x3 – 9x + 1 = 0, using Bisection Method correct to three decimal

3 Find the real root of e x = 3x by Bisection Method. [Ans 1.5121375]

4 Find the positive real root of x – cos x = 0 by Bisection Method, correct to four decimal

5 Find a root of x3 – x – 11 = 0 using Bisection Method correct to three decimal places which

6 Find the positive root of the equation xe x = 1 which lies between 0 and 1

[Ans 0.5671433]

7 Solve x3 – 9x + 1 = 0 for the root between x = 2 and x = 4 by the method of Bisection.

(U.P.T.U 2005) [Ans 2.94282]

8 Compute the root of log x = cos x correct to 2 decimal places using Bisection Method.

[Ans 1.5121375]

9 Find the root of tan x + x = 0 up to two decimal places which lies between 2 and 2.1 using

10 Use the Bisection Method to find out the positive square root of 30 correct to 4 decimal

This method is essentially same as the bisection method except that instead of bisecting the interval

In this method, we choose two points x0 and

x1 such that f(x0) and f(x1) are of opposite signs

Since the graph of y = f(x) crosses the X-axis

between these two points, a root must lie in between

these points

Consequently, f(x0) f(x1) < 0 Equation of the

chord joining points {x0, f(x0)} and {x1, f (x1)} is

( ) ( )1 ( ) (0 )

1 0

y f

The method consists in replacing the curve

AB by means of the chord AB and taking the point

of intersection of the chord with X-axis as an

approximation to the root

So the abscissa of the point where chord cuts y = 0 is given by

2 0 ( )1 0( ) ( )0

= −

Y

X A{ , ( ) )} x f x0 0

x0

x3 x2 x3 P( ) x

B FIG 2.2

Trang 2

The value of x2 can also be put in the following form:

( ) ( )

2

x

=

In general, the (i + 1)th approximation to the root is given by

( ) ( )

1

1

i

x

+

=

2.5.1 Procedure for the False Position Method to Find the Root of the Equation f (x) = 0

Step 1: Choose two initial guess values (approximations) x0 and x1 (where x1 > x0) such

that f(x0).f(x1) < 0

Step 2: Find the next approximation x2 using the formula

( ) ( )

( ) ( )

2

x

=

and also evaluate f(x2)

Step 3: If f(x2) f(x1) < 0, then go to the next step If not, rename x0 as x1 and then go to

the next step

Step 4: Evaluate successive approximations using the formula

( ) ( )

( ) ( )

1

1

, where = 2, 3, 4,

i

+

=

But before applying the formula for xi + 1, ensure whether f(x i–1 ) f(x i) < 0; if not,

rename x i–2 as x i–1 and proceed

Step 5: Stop the evaluation when x ix i−1 < ε, where ε is the prescribed accuracy

2.5.2 Order (or Rate) of Convergence of False Position Method

The general iterative formula for False Position Method is given by

( ) ( )

1

1

i

x

+

=

where x i–1 , xi and xi+1 are successive approximations to the required root of f(x) = 0.

The formula given in (1), can also be written as:

( ) ( )

( ) 1 ( )

1

1

− +

= −

Let α be the actual (true) root of f(x) = 0, i.e., f(α) = 0 If e i–1 , e i and e i+1 are the successive

errors in (i – 1)th, ith and (i + 1)th iterations respectively, then

e i–1 = x i–1 – α, e i = x i – α, e i + 1 = x i + 1 – α

or x i–1 = α + e i–1 , x i = α + e i , x i+1 = α + e i+1

Trang 3

Using these in (2), we obtain

( ) ( )

1

1

− +

− α +

α + = α + −

α + − α +

or ( ) ( )

1

1

− +

− α +

= −

Expanding f(α + e i ) and f(α + e i – 1) in Taylor’s series around α, we have

2 1

1

2

i

e

− +

′ ′′

−  α + α + α + 

= −

α + α + α + − α + ′ α + α +

i.e.,

− +

′ ′′

−  α + α + α 

= −

2 1

1 1

2

2

i

i i

e

, [on ignoring the higher order terms]

i.e

+

α + α + α

= =

+

 α +  ′′ α 

2

1

1

2

'

2

i i

e

i.e

′ α + ′′ α

+

 ′ α +  ′′ α 

2

+ 1

1

2 =

2

i i

e

[since f(α) = 0]

i.e

( ) ( ) ( ) ( )

2

1

1

2 1

2

i i

f e e f

f

f

+

= −

′′

,

[on dividing numerator and denominator by f′(α)

i.e ( )

1 2

1

− + = − + ′′ α  + +  ′′ α 

 ′ α     ′ α 

i.e ( )

2

1

i

e

− + = − + ′′ α  − +  ′′ α 

 ′ α     ′ α 

Trang 4

i.e., ( )

2

1

( )

+

 + ′′ α ′′α +  ′′ α  

i.e., ( )

( ) ( )

= 1− ′ α +

2

2

f

f

If e i–1 and e i are very small, then ignoring 0(e2i ), we get

( )

( )

2

f

f

+ − ′′ α

which can be written as

e i + 1 = e i e i–1 M, where M = ( )

( )

2

f f

′′ α

′ α and would be a constant (5)

In order to find the order of convergence, it is necessary to find a formula of the type

e i + 1 = Ae k

i with an appropriate value of k. (6) With the help of (6), we can write

e i = Ae k i−1 or e i–1 = (e i /A) 1/k

Now, substituting the value of e i+1 and e i–1 in (5), we get

Ae k i = e i

1/

k i e M A

 

 

Comparing the powers of e i on both sides of (7), we get

k = 1 + (1/k)

From (8), taking only the positive root, we get k = 1.618

By putting this value of k in (6), we have

i 1 1.618i or 1.618i +1

i

e

e

Comparing this with lim i k1

e A e

+

→∞

 

 

 

  , we see that order (or rate) of convergence of false

position method is 1.618

Example 1 Find a real root of the equation f(x) = x 3 – 2x – 5 = 0 by the method of false position

up to three places of decimal.

Sol Given that f(x) = x3 – 2x – 5 = 0

So that f(2) = (2)3 – 2(2) – 5 = – 1

Trang 5

and f(3) = (3)3 – 2(3) – 5 = 16

Therefore, a root lies between 2 and 3

First approximation: Therefore taking x0 = 2, x1 = 3, f(x0) = – 1, f(x1)= 16, then by Regula-Falsi method, we get

2 0 ( )1 0( ) ( )0

= −

− ( )

= − − = + =

+

Now, f(x2) = f(2.0588)

= (2.0588)3 – 2 (2.0588) – 5 = – 0.3911 Therefore, root lies between 2.0588 and 3

Second approximation: Now, taking x0 = 2.0588, x1 = 3, f(x0) = – 0.3911, f(x1) = 16, then by Regula-Falsi method, we get

3 0 ( )1 0( ) ( )0

= −

= 2.0588 – 3 2.0588

16 0.3911

− + (– 0.3911) = 2.0588 + 0.0225 = 2.0813

Now, f(x3) = f (2.0813)

= (2.0813)3 – 2(2.0813) – 5 = – 0.1468 Therefore, root lies between 2.0813 and 3

Third approximation: Taking x0 = 2.0813 and x1 = 3, f(x0) = – 0.1468, f(x1) = 16 Then by Regula-Falsi method, we get

4 0 ( )1 0( ) ( )0

= −

= 2.0813 – 3 2.0813

− + (– 0.1468) = 2.0813 + 0.0084 = 2.0897

Now, f(x4) = f(2.0897)

= (2.0897)3 – 2 (2.0897) – 5

= 9.1254 – 9.1794 = – 0.054 Therefore, root lies between 2.0897 and 3

Fourth approximation: Now, taking x0 = 2.0897, x1 = 3, f (x0) = – 0.054, f (x1) = 16, then by Regula-Falsi method, we get

5 0 ( )1 0( ) ( )0

= −

= 2.0897 – 3 2.0897 ( 0.054)

16 0.054

+

= 2.0897 + 0.0031 = 2.0928

Trang 6

Now, f(x5) = f(2.0928)

= (2.0928)3 – 2(2.0928) – 5

= 9.1661 – 9.1856 = – 0.0195 Therefore, root lies between 2.0928 and 3

Fifth approximation: Now, taking x0 = 2.0928, x1 = 3, f(x0) = – 0.0195, f(x1) = 16, then we get

6 0 ( )1 0( ) ( )0

= −

= 2.0928 – 3 2.0928 ( )

0.0195

16 0.0195

+

= 2.0928 + 0.0011 = 2.0939 Now, f(x6) = f(2.0939)

= (2.0939)3 – 2 (2.0939) – 5

= 9.1805 – 9.1879 = – 0.0074 Thus the root lies between 2.0939 and 3

Sixth approximation: Now, taking x0 = 2.0939, x1 = 3, f(x0) = – 0.0074, f(x1) = 16, then we get

7 0 ( )1 0( ) ( )0

= −

= 2.0939 – 3 2.0939 ( 0.0074)

16 0.0074

+

= 2.0939 + 0.00042 = 2.0943 Now, f(x7) = f(2.0943)

= (2.0943)3 – 2(2.0943) – 5

= 9.1858 – 9.1886 = – 0.0028 Therefore, root lies between 2.0943 and 3

Seventh approximation: Taking x0 = 2.0943, x1 = 3, f(x0) = – 0.0028, f(x1) = 16, then by Falsi position method, we get

8 0 ( )1 0( ) ( )0

= −

= 2.0943 – 3 2.0943 ( 0.0028)

16 0.0028

+

= 2.0943 + 0.00016 = 2.0945 Hence, the root is 2.094 correct to three decimal places

Example 2 Find the real root of the equation f(x) = x 3 – 9x + 1 = 0 by Regula-Falsi method.

So that f(2) = (2)3 – 9(2) + 1 = – 9

f(3) = (3)3 – 9(3) + 1 = 1

Trang 7

Since f(2) and f(3) are of opposite signs, therefore the root lies between 2 and 3, so taking

x0 = 2, x1 = 3, f(x0) = – 9, f(x1) = 1, then by Regula-Falsi method, we get

First approximation: 2 0 ( )1 0( ) ( )0

= −

− ( )

= − × − = + = +

Now, f(x2) = f(2.9)

= (2.9)3 – 9 (2.9) + 1

= 24.389 – 25.1 = – 0.711

Second approximation: The root lies between 2.9 and 3 Therefore, taking x0 = 2.9, x1 = 3,

f(x0) = – 0.711, f(x1) = 1 Then

3 0 ( )1 0( ) ( )0

= −

= 2.9 – 3 2.9 ( 0.711)

1 0.711

− − +

= 2.9 + 0.0416 = 2.9416 Now, f(x3) = f(2.9416)

= (2.9416)3 – 9(2.9416) + 1

= 25.4537 – 25.4744 = – 0.0207

Third approximation: The root lies between 2.9416 and 3 Therefore, taking x0 = 2.9416,

x1 = 3, f(x0) = – 0.0207, f(x1) = 1 Then we get

4 0 ( )1 0( ) ( )0

= −

= 2.9416 – 3 2.9416( 0.0207)

1 0.0207

+

= 2.9416 + 0.0012 = 2.9428 Now, f(x4) = f (2.9428)

= (2.9428)3 – 9(2.9428) + 1

= 25.4849 – 25 4852 = – 0.0003 Fourth approximation: The root lies between 2.9428 and 3 Therefore, taking

x0 = 2.9428, x1 = 3, f (x0) = – 0.0003, f (x1) = 1 Then by False Position method, we have

5 0 ( )1 0( ) ( )0

= −

= 2.9428 – 3 2.9428( 0.0003)

1 0.0003

+

= 2.9428 + 0.000017 = 2.942817 Hence, the root is 2.9428 correct to four places of decimal

Trang 8

Example 3 Using the method of False Position, find the root of equation x 6 – x 4 – x 3 –1 = 0 up

to four decimal places.

Sol Let f(x) = x6– x4 – x3 – 1

f(1.4) = (1.4)6 – (1.4)4 – (1.4)3 – 1 = – 0.056

f(1.41) = (1.41)6 – (1.41)4 – (1.41)3 – 1 = 0.102 Hence the root lies between 1.4 and 1.41

Using the method of False Position,

2 0 ( )1 0( ) ( )0

= −

= 1.4 – 1.41 1.4 ( 0.056)

0.102 0.056

+

= 1.4 + 0.01 ( )

0.056 1.4035 0.158

 

 

Now, f (1.4035) = (1.4035)6 – (1.4035)4 – (1.4035)3 – 1

f (x2) = – 0.0016 (–ve) Hence the root lies between 1.4035 and 1.41

Using the method of False Position,

3 2 ( ) ( ) ( )1 2 2

= −

+

1.41 1.4035

( 0.0016) 0.102 0.0016

= 1.4035 + 0.0065 (0.0016) 1.4036

0.1036

Now, f(1.4036) = (1.4036)6 – (1.4036)4 – (1.4036)3 – 1

f(x3) = – 0.00003 (–ve) Hence the root lies between 1.4036 and 1.41

Using the method of False Position,

4 3 ( )1 3( ) ( )3

= −

= 1.4036 – 1.41 1.4036 ( 0.00003)

0.102 0.00003

+

= 1.4036 + 0.0064 ( )

0.10203

Since, x3 and x4 are approximately the same upto four places of decimal, hence the required root of the given equation is 1.4036

Trang 9

Example 4 Find a real root of the equation f(x) = x 3 – x 2 – 2 = 0 by Regula-Falsi method.

Sol Let f(x) = x3 – x2 – 2 = 0

Then, f(0) = – 2, f(1) = – 2 and f(2) = 2

Thus, the root lies between 1 and 2

First approximation: Taking x0=1,x1=2, (f x0)= −2 and f x( )1 = 2 Then by Regula-Falsi method, an approximation to the root is given by

2 0 1 0 0

( )

f x f x

= −

= − − = + = +

Now, f x( 2)= f(1.5)

= (1.5)3 – (1.5)2 – 2

= 3.375 – 4.25 = – 0.875 Thus, the root lies between 1.5 and 2

Second approximation: Taking x0 =1.5,x1=2, ( )f x0 = −0.875 and f x( ) 2.1 = Then the next approximation to the root is given by

3 0 1 0 0

( )

f x f x

= −

= 1.5 – 2 1.5 ( 0.875)

2 0.875

− − +

= 1.5 + 0.1522 = 1.6522 Now, f(x3) = f(1.6522)

= (1.6522)3 – (1.6522)2 – 2

= 4.5101 – 4.7298 = – 0.2197 Thus, the root lies between 1.6522 and 2

Third approximation: Taking x0 = 1.6522, x1 = 2, f(x0) = – 0.2197 and f(x1) = 2 Then the next appoximation to the root is given by

4 0 1 0 0

( )

f x f x

= −

= 1.6522 – 2 1.6522 ( 0.2197)

2 0.2197

+

= 1.6522 + 0.0344 = 1.6866 Now, f(x4) = f(1.6866)

= (1.6866)3 – (1.6866)2 – 2

= 4.7977 – 4.8446 = – 0.0469 Thus, the root lies between 1.6866 and 2

Trang 10

Fourth approximation: Taking x0 = 1.6866, x1 = 2, f (x0) = – 0.046 and f (x1) = 2 Then the root is given by

5 0 1 0 0

( )

f x f x

= −

= 1.6866 – 1.6866 ( 0.0469)

2 0.0469

+

= 1.6866 + 0.0072 = 1.6938 Now, f(x5) = f(1.6938)

= (1.6938)3 – (1.6938)2 – 2

= 4.8594 – 4.8690 = – 0.0096 Thus, the root lies between 1.6938 and 2

Fifth approximation: Taking x0 = 1.6938, x1 = 2, f(x0) = – 0.0096 and f(x1) = 2 Then the next approximation to the root is given by

6 0 1 0 0

( )

f x f x

= −

= 1.6938 – 2 1.6938( 0.0096)

2 0.0096

+

= 1.6938 + 0.0015 = 1.6953 Now, f(x6) = f(1.6953)

= (1.6953)3 – (1.6953)2 – 2

= 4.8724 – 4.8740 = – 0.0016 Therefore, the root lies between 1.6953 and 2

Sixth approximation: Taking x0 = 1.6953, x1 = 2, f(x0) = – 0.0016 and f(x1) = 2 Then the next approximation to the root is

7 0 1 0 0

( )

f x f x

= −

= 1.6953 – 2 1.6953( 0.0016)

2 0.0016

+

= 1.6953 + 0.0002 = 1.6955 Hence, the root is 1.695 correct to three places of decimal

Example 5 Find a real root of the equation f(x) = xe x – 3 = 0, using Regula-Falsi method correct

to three decimal places.

Sol We have f(x) = xe x – 3 = 0

Then f(1) = 1e1 – 3 = – 0.2817

and f(1.5) = (1.5)e(1.5) – 3 = 3.7225

The root lies between 1 and 1.5 Therefore, taking x0 = 1, x1 = 1.5, f(x0) = – 0.2817 and

f(x1) = 3.7225 The first approximation to the root is

Ngày đăng: 04/07/2014, 15:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w