Docsity

Numerical Integration Trapezoidal Rule, Lecture notes of Engineering Mathematics

Partial preview of the text

Download Numerical Integration Trapezoidal Rule and more Lecture notes Engineering Mathematics in PDF only on Docsity!

Module 2

Lesson 8

Numerical Integration

Trapezoidal Rule

Edgar M. Adina

Instructor

CE50P- 2

Numerical Solutions to Engineering Problems

Lesson Objectives:

At the end of this lesson, students should be able to:

1.Explain the need for numerical techniques of integration,

2.derive the multiple-segment trapezoidal rule of

integration, and

3.use the multiple-segment trapezoidal rule of integration to

solve related applications of definite integrals.

Trapezoidal Rule

One way to approximate a definite integral is to
use n trapezoids.
In the development of this method,
assume that f is continuous and
positive on the interval [ a , b ].
So, the definite integral
represents the area of the region
bounded by the graph of f and the
x- axis, from x = a to x = b.

Trapezoidal Rule: n = 4

A 1 A 2 A 3 A 4

f ( x 0 )

f ( x 1 ) f ( x 2 )

f ( x 3 )

f ( x 4 )

a b

๐’˜๐’Š๐’…๐’•๐’‰ =

๐’ƒ โˆ’ ๐’‚

๐’

= ๐šซ๐’™

๐šซ๐’™

+

_________________________

๐‘จ๐Ÿ =

๐’ƒ โˆ’ ๐’‚

๐’

๐’‡ ๐’™๐ŸŽ + ๐’‡ ๐’™๐Ÿ

๐Ÿ

๐‘จ๐Ÿ =

๐’ƒ โˆ’ ๐’‚

๐’

๐’‡ ๐’™๐Ÿ + ๐’‡ ๐’™๐Ÿ

๐Ÿ

๐‘จ๐Ÿ‘ =

๐’ƒ โˆ’ ๐’‚

๐’

๐’‡ ๐’™๐Ÿ + ๐’‡ ๐’™๐Ÿ‘

๐Ÿ

๐‘จ๐Ÿ’ =

๐’ƒ โˆ’ ๐’‚

๐’

๐’‡ ๐’™๐Ÿ‘ + ๐’‡ ๐’™๐Ÿ’

๐Ÿ

๐‘จ๐‘ป =

๐’ƒ โˆ’ ๐’‚

๐Ÿ๐’

๐’‡ ๐’™๐ŸŽ + ๐Ÿ๐’‡ ๐’™๐Ÿ + ๐Ÿ๐’‡ ๐’™๐Ÿ + ๐Ÿ๐’‡ ๐’™๐Ÿ‘ + ๐’‡ ๐’™๐Ÿ’

  • Example

Example 2

The vertical distance covered by a rocket from t=8 to t=30 seconds is given by:

๏ƒฒ ๏ƒท ๏ƒธ

๏ƒถ ๏ƒง

๏ƒจ

๏ƒฆ โˆ’ ๏ƒบ ๏ƒป

๏ƒน

๏ƒช ๏ƒซ

๏ƒฉ

โˆ’

=

30

8

9 8

140000 2100

140000 2000_. t dt_

t

x ln

a) Use single segment Trapezoidal rule to find the distance covered.

b) Find the true error, for part (a).

c) Find the absolute relative true error, for part (a).

Et

๏ƒŽ a

Solution

b) The exact value of the above integral is

๏ƒฒ ๏ƒท ๏ƒธ

๏ƒถ ๏ƒง

๏ƒจ

๏ƒฆ โˆ’ ๏ƒบ ๏ƒป

๏ƒน

๏ƒช ๏ƒซ

๏ƒฉ

โˆ’

=

30

8

9 8

140000 2100

140000 2000_. t dt_

t

x ln =^11061 m

Et = TrueValue โˆ’ Approximate Value = 11061 โˆ’ 11868 = โˆ’ 807 m

c) The absolute relative true error, ๏ƒŽ t , would be

100 11061

11061 11868 ๏‚ด

โˆ’ ๏ƒŽ t = = 7_._ 2959 %

Example 3

Answer Example 2 with n=2.
Solution

๏ƒบ ๏ƒป

๏ƒน

๏ƒช ๏ƒซ

๏ƒฉ

๏ƒพ

๏ƒฝ

๏ƒผ

๏ƒฎ

๏ƒญ

๏ƒฌ

โˆ’ = (^) ๏ƒฅ

โˆ’

=

f(a) f(a ih) f(b ) n

b a I

n

i

1

1

2 2

n = 2 a = 8 b = 30

2

30 โˆ’ 8

n

b a h

โˆ’ = = 11

๏ƒบ ๏ƒป

๏ƒน

๏ƒช ๏ƒซ

๏ƒฉ

๏ƒพ

๏ƒฝ

๏ƒผ

๏ƒฎ

๏ƒญ

๏ƒฌ

โˆ’ = (^) ๏ƒฅ

โˆ’

=

f( ) f(a ih) f( ) ( )

I i

8 2 30 2 2

30 8 2 1

1

๏› (^) f ( 8 ) 2 f( 19 ) f( 30 ) ๏ 4

22 = + +

๏› 177 27 2 48475 90167 ๏ 4

22 =. + (. ) +. = 11266 m

Solution

Table 1 gives the values

obtained using multiple

segment Trapezoidal rule for

n Value Et

1 11868 - 807 7.296 ---

2 11266 - 205 1.853 5.

3 11153 - 91.4 0.8265 1.

4 11113 - 51.5 0.4655 0.

5 11094 - 33.0 0.2981 0.

6 11084 - 22.9 0.2070 0.

7 11078 - 16.8 0.1521 0.

8 11074 - 12.9 0.1165 0.

๏ƒฒ ๏ƒท ๏ƒธ

๏ƒถ ๏ƒง ๏ƒจ

๏ƒฆ โˆ’ ๏ƒบ ๏ƒป

๏ƒน ๏ƒช ๏ƒซ

๏ƒฉ

โˆ’

=

30

8

98 140000 2100

140000 2000_. t dt t_

x ln

Table 1: Trapezoidal Rule Values for n=1,2,3,โ€ฆ,

๏ƒŽ t % ๏ƒŽ a %

Exact Value=11061 m