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

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

10 307 0
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

Tiêu đề Trapezoidal Rule, Simpson’s Rules, Boole’s Rule, Weddle’s Rule
Trường học University of Computer Science and Technology
Chuyên ngành Numerical and Statistical Techniques
Thể loại Textbook
Năm xuất bản 2023
Thành phố Unknown
Định dạng
Số trang 10
Dung lượng 118,73 KB

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

Nội dung

Note: Using the formula, the given interval of integration must be divided into an even number of sub-intervals... Note: Using this formula, the given interval of integration must be div

Trang 1

6.5 TRAPEZOIDAL RULE

Putting n =1 in equation (2) and taking the curve y = f(x) through (x0, y0) and (x0, y0) as a polynomial

of degree one so that differences of order higher than one vanish, we get

0

0

1

x h

x

f x dx h y y y y y y y

+

∫ Similarly, for the next sub interval (x0+h x, 0+2h),we get

2

( 1)

x nh

f x dx y y f x dx y y

+ +

Adding the above integrals, we get

0

0

2

x nh

x

h

f x dx y y y y y

+

∫ which is known as Trapezoidal rule

Putting n = 2 in equation (2 ) and taking the curve through ( ,x y0 0),( ,x y1 1) and ( ,x y2 2) as a polynomial of degree two so that differences of order higher than two vanish, we get

0

0

2

2

1

6

x

+

2

y y y y y y y y y

0

4

2

3

h

f x dx y y y

+

+

0

0

( 2)

3

x nh

h

f x dx y y y

+

+ −

∫ Adding the above integrals, we get

0

0

3

x nh

x

h

f x dx y y y y y y y y

+

∫ which is known as Simpson’s one-third rule

Note: Using the formula, the given interval of integration must be divided into an even number of sub-intervals.

Trang 2

6.7 SIMPSON’S THREE-EIGHT RULE

Putting n = 3 in equation (2) and taking the curve through (x0, y0), (x1, y1), (x2, y2) and (x3, y3) as a polynomial of degree three so that differences of order higher than three vanish, we get

0

0

3

( ) 3

x

f x dx h y y y y

+

3

8

h

y y y y y y y y y y

( 0 1 2 3)

3

8

h

y y y y

0

6

3

3

8

h

f x dx y y y y

+

+

0

0

6

( 3)

3

8

h

+

+ −

Adding the above integrals, we get

0

0

3

8

x nh

x

h

f x dx y y y y y y y y y y y

+

which is known as Simpson’s three-eighth rule

Note: Using this formula, the given interval of integration must be divided into sub-intervals whose

number n is a multiple of 3.

Putting n = 4 in equation (2) and neglecting all differences of order higher than four, we get

0

0

4

0

( )

x

+

(By Newton’s forward interpolation formula)

4 4

0

y

h yy y y y

2

45

h

2

45

h

x x

h

+

Trang 3

Adding all these integrals from x0 to x0 + nh, where n is a multiple of 4, we get

0

2

45

x nh

x

h

+

This is known as Boole’s rule

Note: Using Boole’s rule, the number of sub-intervals should be taken as a multiple of 4.

Putting n = 6 in equation (2) and neglecting all differences of order higher than six, we get

0

0

0

( )

x

r r r r r

+

( 1)( 2)( 3)( 4)( 5)

6!

r r r r r r

y dr

h ryy   yr ry

6 6 0 0

720 7r 2r r 4r 3r r y

= 6 3 9

41 20

11 20

41 840

h yL + y + y + y + y + y + y

h

3

10

h

+41(y4−4y3+6y2−4y1+y0) 11(+ y5−5y4+10y3−10y2+5y1−y0)

+(y6−6y5+15y4−20y3+15y2−6y1+y0)] 341

42≈1

L

NM O QP

( 0 1 2 3 4 5 6)

3

10

h

y y y y y y y

Trang 4

Similarly, 0 ( ) ( )

0

12

6

3

10

h

+

∫ 0

( 6)

3

10

x nh

h

+

∫ Adding the above integrals, we get

0

3

10

x nh

x

h

+

which is known as Weddle’s rule Here n must be a multiple of 6.

Example 1 Use Trapezoidal rule to evaluate 10 1

1+x dx

Sol Let h = 0.125 and y = f(x) = 1

1 x+ , then the values of y are given for the arguments which

are obtained by dividing the interval [0,1] into eight equal parts are given below:

1

1

y

x

=

+ 1.0 0.8889 0.8000 0.7273 0.6667 0.6154 0.5714 0.5333 0.5

Now by Trapezoidal rule

0

1

h

+

0.125 [1 2(0.8889 0.800 0.7273 0.6667 0.6154 0.5714 0.5333) 0.5] 2

0.125 [1.5 2(4.803)]

2

Example 2 Evaluate 01 1 2

dx x

+

(i) Simpson’s 1

3 rule taking

1 4

h=

(ii) Simpson’s 3

8 rule taking

1 6

h=

(iii) Weddle’s rule taking 1

6

h=

Hence compute an approximate value of π in each case.

Trang 5

Sol (i) The values of 2

1 ( ) 1

f x

x

= + at

1 2 3

0, , , , 1

4 4 4

( )

16

17

x

f x

By Simpon’s 1

3 rule

1

2

3 1

+

1 { }16

Also,

1

4 1

dx

x x

+

4

(ii) The values of ( ) 1 2

1

f x

x

= + at x = 0,

1 2 3 4 5 , , , , ,1

( )

1

x

f x

By Simpson’s 3

8 rule

1

2 0

3

8 1

+

∫ =

6

1

36 37

9 10

9 13

36

4 5

FH IK L FHG IKJ+ + RST + + + UVW+ FHG IKJ

Also,

1 2

dx x

π

= +

4

Trang 6

(iii) By Weddle’s rule

1

2 0

3

10 1

+

1 3

6

 

 

Since

1 2

dx x

π

= +

4

π =

Example 3 Evaluate 06 1 2

dx x

+

(i) Trapezoidal Rule

(ii) Simpson’s one-third rule

(iii) Simpson’s three-eighth rule

(iv) Weddle’s rule.

Sol Divide the interval (0, 6) into six parts each of width h = 1.

The value of ( ) 1 2

1

f x

x

= + are given below:

17

1 26

1 37

(i) By Trapezoidal rule,

2 1

+

1 1 1 2 0.5 0.2 0.1 1 1

=  + +  + + + + 

= 1.410798581 Ans

(ii) By Simpson’s one-third rule,

2

3 1

+

1 1 1 4 0.5 0.1 1 2 0.2 1

=  + +  + + +  + 

Trang 7

(iii) By Simpson’s three-eighth rule,

6

2 0

3

8 1

+

∫ = 3 1 1 3 0.5 0.2 1 1 2(0.1)

= 1.357080836 Ans

(iv) By Weddle’s rule,

6

2 0

3

10 1

+

3 1 5(0.5) 0.2 6(0.1) 1 5 1 1

 

=1.373447475 Ans

Example 4 Using Simpson’s one-third rule, find 6 2

0 (1 )

dx x

+

Sol Divide the interval [0,6] into 6 equal parts with 6 0

6

h= −

= 1 The values of 1 2

(1 )

y x

=

each points of sub-divisions are given by

2

1

y

x

=

By Simpson’s one-third rule, we get

6

2

3 (1 )

dx h

y y y y y y y

x = + + + + + + +

1 4(0.25 0.0625 0.02778) 2(0.11111 0.04) 0.02041

= 1[1.02041 4(0.34028) 2(0.15111)]

= 0.89458 Ans

Example 5 Evaluate 4 2

0 1

dx x

x

+

(i) h = 1 (ii) h = 0.5 Compare the rusults with the actual value and indicate the error in both.

Trang 8

Sol (i) Dividing the given interval into 4 equal subintervals (i.e h = 1), the table is as below:

2

1 5

1 10

1 17

Using Boole’s rule,

1

4

0

2

45

h

= 2 1

45 7 1 32

1

2 12

1

5 32

1

10 7

1 17

( ) ( )+ FH IK+ FH IK+ FH IK+ FH IK

L

∴ 4 2

1

dx

x = +

(ii) Dividing the given interval into 8 equal subintervals (i.e h = 0.5), the table is as below:

53

1 17

Using Boole’s rule,

0

2

45

h

= 1.326373

x

1 2

0

4

+

But the actual value is

2

1

dx

x x

+

Error in I result = 1.325818 1.289412 100 2.746%

1.325818

Error in II result = 1.325818 1.326373 100 0.0419%

1.325818

Trang 9

Example 6 Evaluate the integral 6 3

0 1

dx x

+

Sol Divide the interval [0,6] into 6 equal parts each of width 6 0 1

6

h= − =

The value of 1 3

1

y x

= +

at each points of sub-divisions are given below:

y 1.0000 0.5000 0.1111 0.0357 0.0153 0.0079 0.0046

By Weddle’s Rule, we get

3 0

3

10 1

+

3 1.0000 5(0.5000 0.0079) 0.1111 0.0153 6(0.357) 0.0046 10

3 1.131 5 0.5079 6 0.0357 10

3 1.131 2.5395 0.2142 10

3 (3.8847) 1.1654

10

Example 7 Evaluate the integral 1.5 3

x dx

e

Sol Dividing the interval [0, 1, 5] into 6 equal parts of each of width 1.5 0 0.25

6

h= − =

and the values of

3 1

x

x y

e

=

− at each points of sub-interval are given by

Now by Weddle’s rule, we get

0

3

10 1

x

dx y y y y y y y

∫ 3(0.25[0 5(0.0549 0.7843) 0.1927 0.5820 0.9694 6(0.3777)]

10

= 0.075[1.7441 + 5(0.8392) +6(0.3777)]

Trang 10

= 0.075[1.7441 + 4.196 + 2.2662] = 0.075(8.2063) = 0.6155 Ans

Example 8 Evaluate the integral 5.2

4 logxdx,

Sol Divide the interval [4, 5.2] into 6 equal sub-interval of each width 5.2 4 0.2

6

values of y = log x are given below:

y 1.3862 1.4350 1.4816 1.5261 1.5686 1.6094 1.6486

By Weddle’s Rule, we get

3

10

h xdx= y + y +y +y +y + y +y

∫ =3(0.2)10 [1.3862 5(1.4350 1.6094) 1.4816 1.5686 6(1.5261) 1.6486]+ + + + + +

0.6[1.3862 5(3.0444) 1.4816 1.5686 6(1.526) 1.6486]

10

0.6[6.085 5(3.0444) 6(1.5261)]

10

0.6[6.085 15.222 9.1566]

10

=0.6(30.4636) 1.8278=

Example 9 A river is 80 m wide The depth y of the river at a distance ‘x’ from one bank is given by the

following table:

Find the approximate area of cross section of the river using

(i) Boole’s rule.

(ii) Simpson’s one-third rule.

Sol The required area of the cross-section of the river

Here no of sub intervals is 8

(i) Boole’s rule,

∫ 80

0

2

45

h

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