Docsity

Numeric Integration Simpson's Rule, Lecture notes of Engineering Mathematics

Partial preview of the text

Download Numeric Integration Simpson's Rule and more Lecture notes Engineering Mathematics in PDF only on Docsity!

Module 2

Lesson 9

Numerical Integration

Simpson’s 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 how the Simpson’s Rule of approximating the

value of a definite integral is obtained;

2.Use the Simpson’s Rule to approximate the integral of a

function and solve related applications of definite

integrals.

Introduction

To develop Simpson’s Rule for approximating a definite integral, partition the interval [ a , b ] into n

subintervals, each of width Δ𝑥 =

𝑏−𝑎

𝑛

.

This time, however, n required to be even, and the subintervals are grouped in pairs such that

On each (double) subinterval [ xi – 2 , xi ], approximate 𝑓 𝑥 by a polynomial p of degree less than or

equal to 2.

Introduction

For example, on the subinterval [ x 0 , x 2 ], choose the polynomial of least degree passing through the

points ( x 0 , y 0 ), ( x 1 , y 1 ), and ( x 2 , y 2 ), as shown below.

Simpson’s Rule

Note: The coefficient

𝑏−𝑎

3𝑛

in the right side can be written as

𝑏 − 𝑎

3𝑛

=

1

3

𝑏 − 𝑎

𝑛

=

1

3

(Δ𝑥)

Hence, the name Simpson’s 1/3 Rule.

Use Simpson’s Rule to approximate

Compare the results for n = 4 and n = 8.

Example 1

Example 2

a) Use Simpson’s Rule, n = 2, to find the approximate value of x

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

30

8

2000_. t dt t_

x ln

b) Find the true error, Et

c) Find the absolute relative true error,  t

Solution:

a) 

30

8

x f ( t ) dt

= f(b)

a b f(a) f

b a x 2

f ( 8 ) 4 f( 19 ) f( 30 )  6

 177 2667 4 484 7455 901 6740  6

.^ + (. ) +.

= = 11065_._ 72 m

Example 2

b) The exact value of the above integral is

30

8

2000_. t dt t_

x ln =^11061_._^34 m

Example 3: Solve Example 2 with n = 4.

h = = 5. 5

Then,

f ( t 0 ) = f ( 8 )

f ( t 1 ) = f ( 8 + 5. 5 ) = f (^13.^5 )

a)

f ( t 2 ) = f ( 13. 5 + 5. 5 ) = f (^19 )

f ( t 3 ) = f ( 19 + 5. 5 ) = f (^24.^5 )

f ( t 4 ) = f ( 30 )

Example 3:

Ands so,

−

−

=

=

−

=

=

( ) 4 ( ) 2 ( ) ( ) 3

2

2

1

1

0 n

n

i even

i

i

n

i odd

i

f t f ti f t f t n

b a x

−

=

=

=

2

2

3

1

( 8 ) 4 ( ) 2 ( ) ( 30 ) 3 ( 4 )

30 8

i even

i

i

i odd

i

f f ti f t f

 ( 8 ) 4 ( ) 4 ( ) 2 ( ) ( 30 ) 12

= f + f t 1 + f t 3 + f t 2 + f

 ( 8 ) 4 ( 13. 5 ) 4 ( 24. 5 ) 2 ( 19 ) ( 30 ) 6

= f + f + f + f + f

 177. 2667 4 ( 320. 2469 ) 4 ( 676. 0501 ) 2 ( 484. 7455 ) 901. 6740  6

= 11061. 64 m

More Results

Table 1: Values of Simpson’s Rule for Example 2 with more sub-intervals

n Approximate Value Et |Єt |

2

4

6

8 10

0.0396%

0.0027%

0.0005%

0.0001% 0.0000%