Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

NUMERICAL ANALYSIS

Lecture -24

Muhammad Rafiq
Assistant Professor
University of Central Punjab
Lahore Pakistan

Simpsons

Rule

Consider the integral


I=
= h

( )

( )

)
!

)(
!

... (a)

In this case if we take n=3 then interval of integration is from


to
+ 3 i-e there are four functional values
,
,
, and
and cousiquently there will be not involve forward
difference of order higher than 3.
I=
3

+ 2 )

( )

= h

+ (

+ (

I=h 3

I=h 3

+ (

)+ (

I=h

+ (
+ (

+ )

)+ (

)
+

I=h
I=

h[

+3

+
+3

+
+

3
0

This rule can be extended for n( multiple of 3) intervals

+3

( )

( )

( )

( )

( )

]++

+3

+3

+3
+3

++

]+

+
+

+3

( )

+3

( )
3
[ + 3( + + + + +
=
8
)+ ]
+ 2( + + + +

+ +

Example No: 1

Evaluate the integral

by simpsons

rule

h=

for ( n=3 )
Solution :a=0

b=

n=3

=>

0
6

f(x)

1.6487

3
2.3774

2
2.71828

+ 3(

[1 + 3(1.6487 + 2.3774) + 2.71828]

= 3.10165

)+

Example No: 2
Evaluate

log

using

(i) Simpsons ( ) rule

( n=6 )

(ii) Simpsons ( ) rule

( n=6 )

Solution:

Using
(i)

a=4

Simpsons ( ) rule
,

b=5.2
4

21
5

n=6
22
5

,
23
5

h=

24
5

25
5

=
26
5

f(x) 0.60206 0.62325 0.64345 0.66276 0.68124 0.69897 0.716003

log

= [

+ 4(

+ ) + 2( + ) +

[0.60206 + 4(0.62325 + 0.66276 +

0.69897) + 2(0.64345 + 0.68124) + 0.716003]


.

log

Now ,
(ii)

.
.

= 0.7938242
Using

Simpsons ( ) rule
log

+ 3(

log

[0.60206 + 3(0.62325 + 0.64345 +

) + 2( ) +

0.68124 + 0.69897) + 2(0.66276) + 0.716003]

log

= 0.7938235

Evaluate the following integrals using Simpsons 3/8 Rule .


#1.

=6

#2.

=6

#3.
#4.

1
ln

=6
=6

#5.Evaluate the integral

Using

(i) Simpsons

Rule ( )

( n=6 )

(ii) Simpsons

Rule ( )

( n=6 )

You might also like