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

A textbook of Computer Based Numerical and Statiscal Techniques part 9 docx

10 534 1
Tài liệu đã được kiểm tra trùng lặp

Đ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 124,02 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

has one root in the interval 0,1.. Calculate this root correct to 5 decimal places... The iterative procedure terminates when the relative error for two successive approximations becomes

Trang 1

Putting i = 2 in (1) x3 = 0.02439

Therefore reciprocal of 41 is 0.0244

Example 8 Find the square root of 20 correct to 3 decimal places by using recursion formula

x i + 1 =  

+

i

x

0

+

  = 4.47

Therefore 20 ≈ 4.472 correct to three decimal places

Example 9 Show that the following rearrangement of equation x 3 + 6x 2 + 10x – 20 = 0 does not yield a convergent sequence of successive approximations by iteration method near x = 1,

x = (20 – 6x 2 – x 3 )/10.

10

x x

f x

=

10

x x

Clearly, f ’(x) < – 1 in nbd of x = 1 Hence f′( )x > 1 and therefore the method and hence

the sequence < x n > does not converge

Example 10 Find the smallest root of the equation

( ) ( )! ! ( ) ( )! !

Sol Written the given equation as

x = 1 +

( ) ( ) ( ) ( )

− + − + = φ(x) Omitting x2 and higher powers of x, we get x = 1 approximately.

x1 = φ(x0) = 1 +

( )2 −( )2 +( )2 −( )2

2! 3! 4! 5! + = 1.2239

x2 = φ(x1) = 1 +

(1.2239) (1.2239) (1.2239) (1.2239)

Trang 2

Similarly, x3 = φ(x2) = 1.38

x4 = φ(x3) = 1.409

x5 = φ(x4) = 1.425

x6 = φ(x5) = 1.434

x7 = φ(x6) = 1.439

x8 = φ(x7) = 1.442

Values of x7 and x8 indicate that the root is 1.44 correct to two decimal places

PROBLEM SET 2.3

1 Use the method of Iteration to find a positive root between 0 and 1 of the equation

2 Find the Iterative method, the real root of the equation 3x – log10 x = 6 correct to four

3 Solve by Iteration method:

(b) sin x = 1

1

x x

+

5 If f(x) is sufficiently differentiable and the iteration x n+1 = F (x n) converges, prove that the order of convergence is a positive integer

6 The equation f(x) = 0, where f(x) = 0.1 – x +

( ) ( ) ( )

− + – has one root in the interval (0,1) Calculate this root correct to 5 decimal places [Ans 0.10260]

7 The equation x2 + ax + b = 0 has two real roots α and β Show that the iteration method

x n+1 = –

2

n

x b a

 + 

  is convergent near x = α if 2α < + βa .

2.7 NEWTON–RAPHSON METHOD (OR NEWTON’S METHOD)

This method can be derived from Taylor’s series as follows:

Let f(x) = 0 be the equation for which we are assuming x0 be the initial approximation and

h be a small corrections to x0, so that

f(x0 + h) = 0

Expanding it by Taylor’s series, we get

f(x0 + h) = f(x0) + hf(x0) +

2

2!

h

f(x0) + = 0

Since h is small, we can neglect second and higher degree terms in h and therefore, we get

f(x0) + hf (x0) = 0

Trang 3

From which we have, h = – ( )

( )00

f x

fx , where [f(x0)¹ 0]

Hence, if x0 be the initial approximation, then next (or first) approximation x1 is given by

x1 = x0 + h = x0 – ( )

( )00

f x

fx

The next and second approximation x2 is given by

x2 = x1 – ( )

( )

′ 1 1

f x

f x

In general, x n+1 = x n – ( )

( )

n n

f x

f x

This formula is well known as Newton-Raphson formula

The iterative procedure terminates when the relative error for two successive approximations becomes less than or equal to the prescribed tolerance

2.7.1 Procedure for Newton Raphson Method to Find the Root of the Equation f (x) = 0

Step 1: Take a trial solution (initial approximation) as x0 Find f(x0) and f(x0)

Step 2: Find next (first) approximation x1 by using the formula x1 = x0 – ( )

( )

′ 0 0

f x

f x

Step 3: Follow the above procedure to find the successive approximations x n + 1 using the

formula x n+1 = x n – ( )

( )n n

f x

fx , where n = 1, 2, 3,

Step 4: Stop the process when x n+1−x n < ε, where ε is the prescribed accuracy

2.7.2 Order (or Rate) of Convergence of Newton-Raphson Method

Let α be the actual root of equation f(x) = 0 i.e., f(a) = 0 Let x n and x n+1 be two successive approximations to the actual root α If e n and e n+1 are the corresponding errors we have, x n = α

+ e n and x n+1 = α + e n+1 By Newton’s-Raphson formula,

e n+1 = e n – ( )

( n n)

α +

′ α +

e n+1 = e n

2

2

2!

2!

′ α + ′′ α + ′′′ α +

n n

n n

e

e

(By Taylor’s expansion)

e n+1 = e n

2

2

2!

2!

′ α + ′′ α +

′ α + ′′ α + ′′′ α +

n n

n n

e

e

[3 f (α) = 0]

Trang 4

e n+1 = ( )

( ) ′′ α ( )

′ α + ′′ α

2

2

n n

e f

f e f (On neglecting high powers of e n)

′′ α

′′

′ α

2

2

1

n

n

f e

f

f

( ) ( ) ( )

′′ α  + ′′ α 

′ α  ′ α 

1 2

1 2

n

n

e

e

=

1

n

n

e

e

( ) ( ) ( )

′′ α  ′′ α 

α  α 

2

or

2 1

2

1

n

e

+ = ′′α −  ′′α  +

′α  ′α  ( )

( )

′′ α

≈2 ′ α

f

f (Neglecting terms containing powers of e n)

Hence by definition, the order of convergence of Raphson method is 2 i.e.,

Newton-Raphson method is quadratic convergent

This also shows that subsequent error at each step is proportional to the square of the previous error and as such the convergence is quadratic

Example 1 Find the real root of the equation x 2 – 5x + 2 = 0 between 4 and 5 by Newton-Raphson’s method.

Now, f(4) = 42 – 5 × 4 + 2 = – 2

Therefore, the root lies between 4 and 5

Now, Newton-Raphson’s method becomes

x n+1 = x n – ( )

( )n n

f x

f x

= x n

2

n

x

or x n+1 =

2 2

n n

x x

Let us take x0 = 4 to obtain the approximation to the root by putting n = 0, 1, 2 into (3),

we get

First approximation:

= −− = ( )−− = =

0 1

4.6667

x x x

Trang 5

Second approximation: The root is given by

( )

2 2

1 2 1

4.6667 2

4.5641

2 5 2 4.6667 5 4.3334

x x x

Third approximation: The root is given by

( )

2 2

2 3 2

4.5616

x x x

Fourth approximation: The root is given by

( )

2 2

3 4 3

4.5616

x x x

Since x3 = x4, hence the root of the equation is 4.5616 correct to four decimal places

Example 2 Solve x 3 + 2x 2 + 10x – 20 = 0 by Newton-Raphson’s method

Sol Let f(x) = x3 + 2x2 + 10x – 20

f(x) = 3x2 + 4x + 10

Now, by Newton-Raphson method, we have

x n + 1 = x n – ( )

( )n n

f x

f x

= x n

2

2

Clearly, f(1) = – 7 < 0 and f(2) = 16 > 0

Therefore root lies between 1 and 2

Let x0 = 1.2 be the initial approximation then

First approximation:

x1 = ( 3 2 )

0 0 2

2

19.12

=

Second approximation: x2 = ( 3 2 )

2

2

2.201364

=

Trang 6

Third approximation: x3 =

3 2

2 2 2

x x

=

2

2(1.3688295) (1.3688295) 10 28.876924

21.0964 3(1.3688295) 4(1.3688295) 10

Fourth approximation: x4 = ( 3 2 )

2

x x

2

21.09614

Hence the required root is 1.3688081

Example 3 Find the real root of the equation x log 10 x = 1.2 by Newton-Raphson’s method.

f(2) = 2 log10 2 – 1.2 = – 0.5979

f(3) = 3 log10 3 – 1.2 = 0.2314 Therefore root lies between 2 and 3

Let us take x0 = 2, then from (1)

f´(x) = log10 x + 1

x x log10 e = log10 x + 0.4343 (2) Now, by Newton’s-Raphson method, we have

x n+1 = x n – ( )

( )n n

f x

f x

= x n – 10

10

n

x

− +

10

+ +

n n

x

Putting n = 0 in (3), we get first approximation

First approximation: x1 = 0

10 0

x x

+ +

( ) 10

+

= +

Putting n = 1 in (3), we get second approximation

Second approximation:

10 1

x x

+ +

Trang 7

= ( )

10

0.4343 2.8133 1.2 2.4128

+

= +

Putting n = 2 in (3), we get third approximation

Third approximation:

10 2

x x

+ +

10

0.4343 2.7411 1.2 2.3905 log 2.7411 0.4343 0.8722

+

= +

Putting n = 3 in (3), we get fourth approximation

Fourth approximation:

10 3

x x

+ +

10

0.4343 2.7408 1.2 2.3903 log 2.7408 0.4343 0.8721

+

= +

Since x3 = x4, hence the root of the equation is 2.7408 correct to four decimal places

Example 4 Find the real root of the equation 3x = cos x + 1 by Newton’s method.

f(1) = 3 – cos 1 – 1 = 1.4597

So the root lies between 0 and 1

Let us take x0 = 0.6

Therefore the Newton’s method gives

x n+1 = x n – ( )

( )n n

f x

f x

3 sin

n

x

First approximation: Putting n = 0, in (3) we get first approximation

0

3 sin

x

+

( )

0.6 sin 0.6 cos 0.6 1

3 sin 0.6

+

= ( ) (0.6 0.5646) 0.8253 1 2.16406

3 0.5646 3.5646

= +

Trang 8

Second approximation: Putting n = 1, in (3) we get second approximation

+

1

3 sin

x

+

0.6071 sin 0.6071 cos 0.6071 1

3 sin 0.6071

+

Since x1 = x2 Therefore the root as 0.6071 correct to four decimal places

Example 5 Find the real root of the equation log x – cos x = 0 correct to three places of decimal

by Newton-Raphson’s method.

f(2) = 1.1092

∴ The root lies between 1 and 2

Also, f(1.1) = log 1.1 – cos 1.1

= 0.0953 – 0.4535 = – 0.3582

f(1.2) = log 1.2 – cos 1.2 = – 0.18 f(1.3) = log 1.3 – cos 1.3 = – 0.0051 f(1.4) = log1.4 – cos 1.4 = 0.1665

Thus the root lies between 1.3 and 1.4

Then by Newton’s-Raphson method, we get

x n + 1 = x n – ( )

( )

n n

f x

f x

Using (1) and (2) x n + 1 = x n – −

+

1 sin

n n

x x

+

Let us take x0 = 1.3

Now putting n = 0 into (3), we get first approximation

First approximation:

+

2

+

2

1 1.3 sin 1.3

Trang 9

= 1.3 1 1.2526 0.2623 0.2674( )

1 1.2526

+

2.2526 = 1.3029

Now putting n = 1 into (3), we get second approximation

Second approximation:

x2 =

2

+

=

+ +

2

1.3029 1.3029 sin 1.3029 1.3029 log 1.3029

1.3029 cos 1.3029

1 1.3029 sin 1.3029

= 1.3029 (1 1.2526 0.2645 0.2647)

1 1.2564

+

2.2564 = 1.3030

Hence the required root is 1.303 correct to three decimal places

Example 6 Evaluate 12 to four decimal places by Newton’s iterative method.

Therefore Newton’s Iterative formula gives,

x n+1 = x n – ( )

( )n n

f x

f x

x n+1 = x n

n

n

x

x

Now since f(3) = – 3 (–ve) and f(4) = 4 (+ve)

Therefore the root lies between 3 and 4

Take x0 = 3.5, equation (2) gives

x1 = 0

0

x1 = 1 3.5 12

  = 3.4643

x2 = 1 3.4643 12

x3 = 1 3.4641 12

Since, x2 = x3 up to four decimal places So we have 12 = 3.4641

Trang 10

Example 7 Find a positive root of (17) 1/3 correct to four decimal places by Newton-Raphson’s method.

Sol The iterative formula for the given equation is

x n+1 = 1 2

2

k x x

+

Here k = 17 Take x0 = 2.5 because !& = 2, ! % = 3

Putting n = 0 in (1), we get

First approximation: x1 = 0 2

0

2

+

x1 = 1 5 17

  = 2.5733

Putting n = 1 in (1), we get

Second approximation:

1

2

+

Putting n = 2 in (1), we get

Third approximation:

2

2

+

x3 = 135.1426+6.6115817 

Putting n = 3 in (1), we get

Fourth approximation:

3

2

+

x1 = 1 5.14256 17

Since x3 and x4 are accurate to four decimal places hence the required root is 2.5713

Example 8 Using Newton’s iterative method, find the real root of x sin + cos x = 0, which is near

x = π correct to 3 decimal places.

Sol Given, f(x) = x sin x + cos x = 0 therefore f(x) = x cos x

The iteration formula is, x n+1 = x n – sin cos

cos

+

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