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

A textbook of Computer Based Numerical and Statiscal Techniques part 6 pptx

10 471 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 117,52 KB

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

Nội dung

2.1 Then, we bisect the interval and continue the process till the root is found to be desired accuracy.. In the above figure, fx1 is positive; therefore, the root lies in between a and

Trang 1

f a ( )

f b ( )

y = ( ) f x

Y

FIG 2.1 Then, we bisect the interval and continue the process till the root is found to be desired

accuracy In the above figure, f(x1) is positive; therefore, the root lies in between a and x1 The

second approximation to the root now is x2 = 1

2 (a + x1) If f (x2) is negative as shown in the figure

then the root lies in between x2 and x1, and the third approximation to the root is x3 = (x2+ x1)/2 and so on

This method is simple but slowly convergent It is also called as Bolzano method or Interval halving method

2.4.1 Procedure for the Bisection Method to Find the Root of the Equation f (x) = 0

Step 1: Choose two initial guess values (approximation) a and b (where (a > b)) such that

f(a) f(b) < 0.

Step 2: Evaluate the mid point x1 of a and b given by x1 = 1

2 (a + b) and also evaluate

f(x1)

Step 3: If f(a) f(x1) < 0, then set b = x1 else set a = x1 Then apply the formula of step 2 Step 4: Stop evaluation when the difference of two successive values of x1 obtained from

step 2, is numerically less than the prescribed accuracy

2.4.2 Order of Convergence of Bisection Method

In Bisection Method, the original interval is divided into half interval in each iteration If we take mid points of successive intervals to be the approximations of the root, one half of the current interval is the upper bound to the error

In Bisection Method, e i + 1 = 0.5e i or i 1 0.5

i

e e

+ =

Trang 2

Here e i and e i + 1 are the errors in i th and (i + 1) th iterations respectively Comparing the above equation with

1 lim i k

e A e

+

We get k = 1 and A = 0.5 Thus the Bisection Method is first order convergent or linearly

convergent

Example 1 Find the root of the equation x 3 – x – 1 = 0 lying between 1 and 2 by bisection method Sol Let f(x) = x3 – x – 1 = 0

Since f(1) = 13 – 1 – 1 = – 1, which is negative

and f (2) = 23 – 2 – 1 = 5, which is positive

Therefore, f(1) is negative and f(2) is positive, so at least one real root will lie between

1 and 2

First iteration: Now using Bisection Method, we can take first approximation

1

1.5

Then, f(1.5) = (1.5)3 – 1.5 – 1

= 3 375 – 1.5 – 1 = 0.875

f (1.5) > 0 that is, positive

So root will now lie between 1 and 1.5

Second iteration: The Second approximation is given by 2=1 1.5+ =2.5=1.25

Then, f(1.25) = (1.25)3 – 1.25 – 1

= 1.953 – 2.25 = – 0.297 < 0

f (1.25) is negative.

Therefore, f(1.5) is positive and f(1.25) is negative, so that root will lie between 1.25 and 1.5.

Third iteration: The third approximation is given by

3

1.25 1.5

1.375 2

x3 = 1.375 Now f(1.375) = (1.375)3 – 1.375 – 1

f(1.375) = 0.2246

f(1.375) is positive.

∴The required root lies between 1.25 and 1.375

Fourth iteration: The fourth approximation is given by

4

1.25 1.375

1.313 2

Now f(1.313) = (1.313)3 – 1.313 – 1

f(1.313) = – 0.0494

Trang 3

Therefore, f(1.313) is negative and f(1.375) is positive Thus root lies between 1.313 and

1.375

Fifth iteration: The fifth approximation is given by

5

1.344 2

f(1.344) = (1.344)3 – 1.344 – 1 = 0.0837

f(1.313) > 0

f(1.313) is negative and f(1.344) is positive, so root lies between 1.313 and 1.344.

Sixth iteration: The sixth approximation is given by

6

1.329 2

f(1.329) = (1.329)3 – 1.329 – 1 = 0.0183

f(1.329) > 0

f(1.313) is negative and f(1.329) is positive, so that the required root lies between 1.313 and

1.329

Seventh iteration: The seventh approximation is given by

7

1.321 2

f(1.321) = (1.321)3 – 1.321 – 1 = – 0.0158

f(1.321) < 0

f(1.321) is negative and f(1.329) is positive, so that the required root lies between 1.321 and

1.329

Eighth iteration: The eighth approximation is given by

8

1.321 1.329

1.325 2

From above iterations, the root of f x( )=x3− − =x 1 0 up to three places of decimals is 1.325, which is of desired accuracy

Example 2 Find the root of the equation x 3 – x – 4 = 0 between 1 and 2 to three places of decimal

by Bisection method.

Sol Givenf x( )=x3− −x 4

We want to find the root lie between 1 and 2

At x0=1 ⇒ 3

0 ( )=(1) − − = −1 4 4

1

f x = − − = positive This implies that root lies between 1 and 2

First iteration: Here, 0 = 1= 2 = + = =

Now, f x( 0)= −4, ( )f x1 =2 Then, = 3− − = −

2

Trang 4

Since f(1.5) is negative and f(2) is positive.

So root will now lie between 1.5 and 2

Second iteration: Here, 0 1 2

1.5 2

2

Also, f x( )0 = −2.125, ( ) 2f x1 = then, = 3− − = −

2

f x

Since f(1.75) is negative and f(2) is positive, therefore the root lies between 1.75 and 2.

Third iteration: Here, 0 = 1= 2= + =

1.75 2

2

Also,f x( )0 = −0.39062, ( )f x1 =2 then, = 3− − =

2

f x

Since f(1.75) is negative and f(1.875) is positive, therefore the root lies between 1.75 and

1.875

Fourth iteration: Here, 0 1 2

1.75 1.875

2

Also,f x( )0 = −0.39062, ( ) 0.71679f x1 = then, = 3− − =

2

f x

Since f(1.75) is negative and f(1.8125) is positive, therefore the root lies between 1.75 and

1.8125

Fifth iteration: Here, 0 1 2

1.75 1.8125

2

Also, f x( )0 = −0.39062, ( ) 0.14184f x1 = then, = 3− − = −

2

f x

Since f(1.78125) is negative and f(1.8125) is positive, therefore the root lies between 1.78125

and 1.8125

Repeating the process, the successive approximations are

x6 = 1.79687, x7 = 1.78906, x8 = 1.79296, x9 = 1.79491, x10 = 1.79589, x11 = 1.79638, x12 = 1.79613 From the above discussion, the value of the root to three decimal places is 1.796

Example 3 Using Bisection Method determine a real root of the equation f x( ) 8= x3−2x− =1 0

Sol It is given that f x( ) 8= x3−2x− =1 0

Therefore, f(0) is negative and f(1) is positive so that the root lies between 0 and 1.

First approximation: First approximation to the root is given by

1

0 1 0.5 2

f(0.5) 8(0.5)= 3−2(0.5) 1− = −1, which is negative

Thus f(0.5) is negative and f(1) is positive Then the root lies between 0.5 and 1.

Trang 5

Second approximation: The second approximation to the root is given by

2

0.5 1

0.75 2

f(0.75) 8(0.75)= 3−2(0.75) 1−

= 2.265 – 2.5 = 0.875, which is positive

Since f(0.5) is negative, while f(0.75) is positive Therefore, the root lies between 0.5 and 0.75.

Third approximation: The third approximation to the root is given by

3

0.5 0.75

0.625 2

f(0.625) 8(0.625)= 3−2(0.625) 1−

=1.935 – 2.25 = – 0.297, which is negative

Therefore f(0.75) is positive, while f(0.625) is obtained negative Therefore, the root lies

between 0.625 and 0.75

Fourth approximation: The fourth approximation to the root is given by

= + =

4

0.625 0.75

0.688 2

x

f(0.688) 8(0.688)= 3−2(0.688) 1−

= 2.605 – 2.376 = 0.229, which is positive

Therefore f(0.688) is obtained positive, while f(0.625) is negative Therefore, the root lies

between 0.625 and 0.688

Fifth approximation: The fifth approximation to the root is given by

x5 = 0.625 0.688

2

+

= 0.657

f(0.673) = 8(0.657)3 – 2(0.673) – 1

= 2.269 – 2.314 = – 0.045, which is negative

Therefore f(0.657) is negative and f(0.688) is positive so the root lies between 0.657 and

0.688

Sixth approximation: The sixth approximation to the root is given by

6

0.657 0.688

0.673 2

f(0.673) 8(0.673)= 3−2(0.673) 1−

Therefore f (0.673) is positive and f(0.657) is negative so the root lies between 0.657 and

0.673

Trang 6

Seventh approximation: The seventh approximation to the root is given by

7

0.657 0.673

0.665 2

f(0.665) 8(0.665)= 3−2(0.665) 1−

= 2.353 – 2.33 = 0.023, which is positive

Therefore f(0.665) is positive and f(0.657) is negative so that the root lies between 0.657

and 0.665

Eighth approximation: The eighth approximation to the root is given by

8

0.657 0.665

0.661 2

From last two approximations, i.e., x7=0.665 and x8=0.661 it is observed that the

approximate value of the root of f(x) = 0 up to two decimal places is 0.66.

Example 4. Perform five interactions of Bisection method to obtain the smallest positive root of equation f x( )=x3−5x+ =1 0

Sol Let f(2.1) = –ve, f(2.15) = +ve.

Therefore the root lies between 2.1 and 2.15

First approximation to the root is

1

2.1 2.15

2.125 2

Now, f(2.125)= −ve

Therefore the root lies between 2.215 and 2.15

Second approximation to the root is

2 2.125 2.15 2.1375

2

Now, f(2.1375)= +ve

Therefore the root lies between 2.125 and 2.1375

Third approximation to the root is

3

2.125 2.1375

2.13125 2

Now, f(2.13125)= +ve

Therefore the root lies between 2.125 and 2.13125

Fourth approximation to the root is

4

2.125 2.13125

2.1281 2

Now, f(2.1281)= −ve

Trang 7

Therefore the root lies between 2.1281 and 2.13125.

Fifth approximation to the root is

5

2.1281 2.13125

2.129 2

Hence the required root is 2.129

Example 5 Find the real root of equation x log 10 x=1.2 by Bisection Method.

Sol Let f x( )=xlog10x−1.2=0

So that f(1) 1 log 1 1.2= 10 − = −1.2 0<

= −0.598 0<

=3(0.4771) 1.2− =0.2313>0

Thus f (2) is negative and f (3) is positive, therefore, the root will lie between 2 and 3.

First approximation: The first approximation to the root is

1 2 3 2.5

2

Again, f(2.5) 2.5 log 2.5 1.2= 10 −

= 2.5 (0.3979) – 1.2 = 0.9948 – 1.2 = – 0.2052 < 0

Thus, f (2.5) is negative and f (3) is positive, therefore, the root lies between 2.5 and 3.

Second Approximation: The second approximation to the root is

2

2.5 3

2.75 2

Now, f(2.75)=2.75 log102.75 1.2−

=2.75(0.4393) 1.2 1.2081 1.2− = − =0.0081 0>

Thus, f (2.75) is positive and f (2.5) is negative, therefore, the root lies between 2.5 and 2.75.

Third approximation: The third approximation to the root is

3

2.5 2.75

2.625 2

Again, f(2.625)=2.625log102.625 1.2−

=2.625(0.4191) 1.2 1.1001 1.2− = − = −0.0999 0<

Thus, f(2.625) is found to be negative and f(2.75) is positive, therefore, the root lies between

2.625 and 2.75

Fourth approximation: The fourth approximation to the root is

4

2.625 2.75

2.6875 2

Again, f(2.6875) = 2.6875 log10 2.6875 – 1.2

= 2.6875(0.4293) – 1.2 = 1.1537 – 1.2 = – 0.0463 < 0

Trang 8

Thus, f(2.6875) is negative and f(2.75) is positive, therefore, the root lies between 2.6875 and

2.75

Fifth approximation: The fifth approximation to the root is

5

2.7188 2

Now, f(2.7188) = 2.7188 log10 2.7188 – 1.2

= 2.7188 (0.4344) – 1.2 = 0.1810 – 1.2 = – 0.019 < 0

Thus, f(2.7188) is negative and f(2.75) is positive, therefore, the root lies between 2.7188 and

2.75

Sixth approximation: The sixth approximation to the root is

6

2.7344 2

Again, f(2.734) = 2.734 log10 2.734 – 1.2

= 2.734 (0.4368) – 1.2 = 1.1942 – 1.2 = – 0.0058 < 0

Thus, f(2.734) is negative and f(2.75) is positive, therefore, the root lies between 2.734 and

2.75

Seventh approximation: The seventh approximation to the root is

7

2.734 2.75

2.742 2

Again, f(2.742) = 2.742 log10 2.742 – 1.2

= 2.742 (0.4381) – 1.2 = 1.2012 – 1.2 = 0.0012 > 0

Thus, f(2.742) is positive and f(2.734) is negative, therefore, the root lies between 2.734 and

2.742

Eighth approximation: The eighth approximation to the root is

8

2.738 2

Hence, from the approximate value of the roots x7 and x8, we observed that, up to two places of decimal, the root is 2.74 approximately

Example 6 Using Bisection Method, find the real root of the equation f(x) = 3x – 1+sin x =0

Sol The given equation

f(x) = 3x – 1 sin+ x=0 is a transcendental equation

Then f(0) = 0 – 1 sin 0+ = −1

= 3 – 1.3570 = 1.643 > 0

Thus f(0) is negative and f(1) is positive, therefore, a root lies between 0 and 1.

Trang 9

First approximation: The first approximation to the root is given by

1 0 1 0.5

2

Now, f(0.5) = 3(0.5) – 1+sin 0.5( )

= 1.5 – 1.4794 = 1.5 – 1.2163 = 0.2837 > 0

Thus, f(0.5) is positive, while f(0) is negative, therefore, a root lies between 0 and 0.5.

Second approximation: The second approximation to the root is given by

2 0 0.5 0.25

2

Again, f(0.25) = 3(0.25) – 1 sin 0.25+ ( )

= 0.75 – 1.2474 = 0.75 – 1.1169 = – 0.3669 < 0

Thus, f(0.25) is obtained to be negative and f (0.5) is positive; therefore, a root lies between

0.25 and 0.5

Third approximation: The third approximation to the root is given by

3

0.25 0.5

0.375 2

Now, f(0.375) = 3(0.375) – 1 sin 0.375+ ( )

= 1.125 – 1.3663 = 1.125 – 1.1689 = – 0.0439 < 0

Thus, f(0.375) is negative and f(0.5) is positive, therefore, a root lies between 0.375 and 0.5.

Fourth approximation: The fourth approximation to the root is given by

4

0.4375 2

Now, f (0.4375) = 3(0.4375) – 1 sin 0.4375+ ( )

= 1.3125 – 1.4237 = 1.3125 – 1.1932 = 0.1193 > 0

Thus, f(0.4375) is positive, while f(0.375) is negative, therefore, a root lies between 0.375 and

0.4375

Fifth approximation: The fifth approximation to the root is given by

5

0.375 0.4375

0.4063 2

Again, f(0.4063) = 3(0.4063) – 1 sin 0.4063+ ( )

= 1.2189 – 1.3952 = 1.2189 – 1.1812 – 0.0377 > 0

Thus, f(0.4063) is positive, while f(0.375) is negative, therefore, a root lies between 0.375 and

0.4063

Trang 10

Sixth approximation: The sixth approximation to the root is given by

6

0.375 0.4063

0.3907 2

Again, f(0.3907) = 3(0.3907) – 1 sin 0.3907+ ( )

= 1.1721 – 1.3808 = 1.1721 – 1.1751 = – 0.003 < 0

Thus, f (0.3907) is negative, while f (0.4063) is positive, therefore, a root lies between 0.3907

and 0.4063

Seventh approximation: The seventh approximation to the root is given by

7

0.3907 0.4063

0.3985 2

From the last two observations, that is, x6 = 0.3907 and x7 = 0.3985, the approximate value

of the root up to two places of decimal is given by 0.39 Hence the root is 0.39 approximately

Example 7.Find a root of the equation f(x) = x 3 – 4x – 9 = 0, using the Bisection method in four stages.

Sol Given f(x) = x3 – 4x – 9 = 0

Then f(2) = 23 – 4(2) – 9 = – 9

Therefore, the root lies between 2 and 3

First approximation: First approximation to the root is given by

1

2.5 2

Thus f(2.5) = (2.5)3 – 4(2.5) – 9

= 15.625 – 19 = – 3.375 Therefore, the root lies between 2.5 and 3

Second approximation: Second approximation to the root is given by

2 2.5 3 2.75

2

Thus f(2.75) = (2.75)3 – 4 (2.75) – 9

= 20.797 – 20 = 0.797

Therefore, f(2.75) is positive and f(2.5) is negative Thus the root lies between 2.5 and 2.75.

Third approximation: Third approximation to the root is given by

3

2.5 2.75

2.625 2

Now, f(2.625) = (2.625)3 – 4 (2.625) – 9

= 18.088 – 19.5 = – 1.412

Therefore, f(2.625) is negative while f(2.75) is positive Thus the root lies between 2.625 and

2.75

Fourth approximation: Fourth approximation to the root is given by

4

2.625 2.75

2.6875 2

Hence, after the four steps the root is 2.6875 approximately

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

TỪ KHÓA LIÊN QUAN