Vous êtes sur la page 1sur 4

Integrimi Numerik

Metodat e tipit Njuton-Kotes


N.q.s. funksionin f ( x) ne segmentin [a, b] e perafrojme me polinomin interpolues
b
te tij ne nje sistem te barazlarguar nyjesh, atehere integrali  f ( x)dx do te
a

perafrohet me integralin perkates te ketij polinomi. Ideja e mesiperme eshte burimi


i metodave te tipit Njuton – Kotes. Fillojme me rastet me te thjeshta te ketyre
metodave.

Formula e Simpson-it

N.q.s. segmentin [a, b] e ndajme ne 2 pjese(nr minimal per formulen e Simpson-it)


ba
te barabarta dhe shenojme h  , atehere integralin
2

f1 P2(x)
f(x)
f2
f3
o x1 = a x2 x3= b x

Duke perdorur pikat  x1 , f1   x2 , f 2   x3 , f3  ndertojme polinomin e Lagranzhit e


rendit te dyte

p2 ( x)  L1 ( x) f1  L2 ( x) f 2  L3 ( x) f3 ,
(x-x 2 )(x-x 3 ) (x-x1 )(x-x 3 ) (x-x1 )(x-x 2 )
p2 ( x)  f1  f2  f3
(x1  x 2 )(x1  x 3 ) (x 2  x1 )(x 2  x 3 ) (x 3  x1 )(x 3  x 2 )
ba
b b b
h
 f ( x)dx   p2 ( x)dx   f1  4 f 2  f3  , pra  f ( x)dx  3  f 1  4 f 2  f3  ku
a a
3 a

hba

N.q.s. segmentin [a, b] e ndajme p.sh. ne n  6 pjese te barabarta dhe shenojme


ba
h , atehere integralin. Duke perdorur pikat  xi , fi  , i  1,2,3,4,5,6,7
6
ndertojme polinomin e Lagranzhit e rendit te dyte ne cdo pjese

 x1, f1   x2 , f2   x3 , f3  ,  x3 , f3   x4 , f4   x5 , f5  ,  x5 , f5   x6 , f6   x7 , f7 

f2

f2 f3
f4
f5 f6 f7

x1 x2 x3 x4 x5 x6 x7 x

b b
h h h
 f ( x)dx   p ( x)dx  3  f
a a
2 1  4 f 2  f3  
3
 f3  4 f 4  f5    f5  4 f 6  f 7 
3

 f ( x)dx 
h
3
 f1  4  f2  f4  f6   2  f3  f5   f7 
a

N.q.s. segmentin [a, b] e ndajme p.sh. ne n  2m pjese te barabarta dhe shenojme


ba
h , atehere integralin
2m
b

 f ( x)dx
a
 x1, f1  ,  x2 , f2  ,  x3 , f3  ,  x4 , f4  ,...,  x2m1, f2m1  , njëlloj si më sipër gjejmë formulën e
plotë të Simpson-it

 f ( x)dx 
h
3
 f1  4( f2  f4  ...  f2m )  2  f3  f5  ...  f 2m1   f2m1 
a

1
Te llogaritet integrali  e  x dx me formulen e plote te Simpson-it n = 6
2

1 0 1
Ne kemi a  0, b  1, n  6 , percaktojme hapin e integrimit h  ,h 
6 6

Organizojme llogaritjet ne nje tabel.

xi 0 1 1 1 2 5 1
6 3 2 3 6
 0  1
2 2 2 2 2 2 2
fi e 1
 
1
 
1
 
2
 
5
  e
6 3 2 3 6
e e e e e

1
h
 e dx 
x
 f1  4( f 2  f 4  f6 )  2( f3  f5 )  f7 
2

0
3

1   02   1     1   


2 2 2 2 2
1 1 5 2
     

0 e dx  18  e  4  e  e  e     e1   0.74683
2
x
  2 e  e 3
2
 6  2 6  3
   
     

4
4
Te llogaritet integrali 1 x
0
2
dx me formulen e plote te Simpson-it n = 8

40 1
Ne kemi a  0, b  4, n  8 , percaktojme hapin e integrimit h  ,h 
8 2

Organizojme llogaritjet ne nje tabel.


xi 0 1 1 3 2 5 3 7 4
2 2 2 2
fi 4 3.2 2 1.2308 0.8 0.5517 0.4 0.3019 0.2353

4
4 h
0 1  x2 3  f1  4( f2  f4  f6  f8 )  2( f3  f5  f7 )  f9 
dx 

4
4 1
0 1  x2 6  4  4(3.2  1.23084  0.5517  0.3019)  2(2  0.8  0.4)  0.2353
dx 

4
4
 1  x dx  5.2955
0
2

Vous aimerez peut-être aussi