Sunteți pe pagina 1din 50

POLITEHNICA University of Bucharest Faculty of Aerospace Engineering

Curs 1
Metode cu diferene finite 2012-2013
S.l.dr.ing.mat. Alina Bogoi
CURS_1_MDF_2012/2013 1

Chapter 1
Derivarea numeric folosind metoda diferenelor finite
S.l.dr.ing.mat. Alina Bogoi Metode cu Diferene Finite
CURS_1_MDF_2012/2013 2

Scopurile prezentrii

Operatori simbolici Diferene finite Teorema lui Taylor pentru aproximarea derivatelor. Extrapolarea Richardson

CURS_1_MDF_2012/2013

Operatori Simbolici
Operator Definiie

D E sau + sau -

diferenial translaie Diferen nainte Diferen napoi

CURS_1_MDF_2012/2013

Operatori Simbolici

Operator Diferenial , D

dy (x ) D y (x ) = = y (x ) dx

CURS_1_MDF_2012/2013

Operatori Simbolici

Operatorul de translaie, E

Ey ( x ) = y ( x + h ) , Ey ( xi ) = y ( xi + h ) = yi +1

E y ( x ) = y ( x + nh )
n
CURS_1_MDF_2012/2013 6

Operatori Simbolici

Definiia derivatei
df ( x ) dx
x0

= f ( x0 ) = lim

f ( x ) f ( x0 ) x x0

x x0

n calcul diferena finit, x - x0 se apropie de zero, dar rmne finit i nenul; se reprezint prin cantitatea h.

h = x x0

Derivata poate fi aproximat prin:

CURS_1_MDF_2012/2013

f ( x0 + h) f (x0 ) f (x0 ) h

Operatori Simbolici

Dezvoltai y(x+h) n serie Taylor folosind operatorii:


h h2 h3 y ( x + h) = y ( x) + y ( x ) + y ( x ) + y ( x ) + K 1! 2! 3! h h2 2 h3 3 D y ( x) + D y ( x) +K y ( x + h ) = y ( x ) + Dy ( x ) + 1! 2! 3! h h 2 2 h3 3 D + D + K y ( x ) y ( x + h ) = 1 + D + 2! 3! 1! y ( x + h ) = e hD y ( x ) E = e hD
Ey ( x ) = y ( x + h )

Seria Taylor ehD.


CURS_1_MDF_2012/2013 8

Operatori Simbolici

Dezvoltai y(x-h) n serie Taylor folosind operatorii:

h h2 h3 y ( x h ) = y ( x ) y ( x ) + y ( x ) y ( x ) + K 1! 2! 3! y ( x h ) = e hD y ( x ) E-1 = e hD

CURS_1_MDF_2012/2013

Operatorul diferena finit nainte,


Se consider setul echivalent de valori:


yi 2 y ( xi 2h ) yi 1 y ( xi h ) yi y ( xi ) yi +1 y ( xi + h ) yi + 2 y ( xi + 2h ) yi + 3 y ( xi + 3h )

yi 3 y ( xi 3h )

Prima diferena finit nainte n

yi = yi +1 yi

yi
=EE
0

y ( x ) = y ( x + h ) y ( x )

y ( x ) = E1 y ( x ) E 0 y ( x ) = E1 E 0 y ( x )
CURS_1_MDF_2012/2013 10

Operatorul diferena finit napoi,


yi + 3 y ( xi + 3h )

Se consider setul echivalent de valori:


yi 2 y ( xi 2h ) yi 1 y ( xi h ) yi y ( xi ) yi +1 y ( xi + h ) yi + 2 y ( xi + 2h )

yi 3 y ( xi 3h )

Prima diferena finit napoi n

yi
= E 0 E 1

yi = yi yi 1

y ( x ) = y ( x ) y ( x h )

y ( x ) = E 0 y ( x ) E 1 y ( x ) = E 0 E 1 y ( x )
CURS_1_MDF_2012/2013 11

Derivarea numeric
Doua metode sunt folosite pentru aproximarea numeric a derivatei:

1. Teorema lui Taylor pentru aproximarea derivatelor. 2. Metoda coeficienilor nedeterminai.

CURS_1_MDF_2012/2013

12

Derivarea numeric
Metoda diferenelor finite folosind dezvoltrile n serie Taylor

j2

j 1

j +1

j+2

x j 1
CURS_1_MDF_2012/2013

x j

x j + 1

x j + 2

j-2

j-1

j+1

j+2

13

Derivarea numeric

Seria Taylor

x = h = x j +1 x j
f
(m)

f ( x) =
nlocuid:

m =0

( x0 ) ( x x0 ) m m!

x = x j +1 , x0 = x j
f ( x j +1 ) = f ( x j + x) =
x0 x
m=0

m ( x ) f (m) ( x j ) m!

CURS_1_MDF_2012/2013

14

Derivarea numeric
T jn + 1
n+1
(x)m T ( x j +1 ) = m! m=0

d mT m dx j

t
n

T jn 1 x
j-1 j

T jn x

T jn +1
j+1

n n n n 2 2 3 3 m m ( x ) T T x T x T 4 n T jn T x O ( x ) = = + + + + +1 j m 2 3 m ! x j 2! x j 3! x j m=0 x j n n n n 2 2 3 3 n (x) m mT T x T x T 4 n m = T j x + 2 3 + O (x ) T j 1 = m ! x j 2! x j 3! x j m =0 x j
CURS_1_MDF_2012/2013 15

Derivarea numeric
Derivata de ordinul I cu diferene nainte Derivata de ordinul I cu diferene napoi Derivata de ordinul I cu diferene centrate

n n T T j +1 T j + O(x) = x x j n n T T j T j 1 + O(x) = x x j n n T T j +1 T j 1 + O(x 2 ) = 2x x j n n n 2T T j +1 2T j + T j 1 2 = + ( ) O x 2 2 x x j n n n n

Derivata de ordinul II cu

diferene centrate

CURS_1_MDF_2012/2013

16

Derivarea numeric
Metoda Grile j-2

coeficienilor nedeterminai uniforme


j-1
x x

j+1
x x

j+2

CURS_1_MDF_2012/2013

17

Derivarea numeric
Metoda General
j-2
x
Tipuri de scheme

j-1
x

j
x

j+1
x

j+2

Schem simetric cu 3-puncte

d m dx = a j 1 + b j + c j +1 + O(x ) j

d m = + + + ( ) a b c O x j j j + 1 + 2 Schem asimetric cu 3-puncte dx j d m = + + + ( ) a b c O x 1 2 j j j Schem asimetric cu 3-puncte dx j d m = + + + + a b c d O x ( ) Schem asimetric cu 4-puncte 1 1 2 j j j j + + dx j



CURS_1_MDF_2012/2013

Schem simetric cu 5-puncte

d O ( x m ) dx = a j 2 + b j 1 + c j + d j +1 + e j + 2 + 18 j

Derivarea numeric

Metoda coeficienilor nedeterminai Grile uniforme(pas constant)


2 3 4 5

2 3 4 5 d ( x ) d ( x ) d ( x ) d ( x ) d j 1 = j ( x ) + 2 3 + 4 5 +L x x x x 2! 3! 4! 5! d d d d j j j j dx j

j2

4 2 3 4 d ( 2 x ) d ( 2 x ) d ( 2 x ) d ( 2 x ) d = j ( 2 x ) + 2! dx 2 3! dx3 + 4! dx 4 5! dx 4 + L dx j j j j j 2 3 4 5

= a j 2 + b j 1 + c j + d j +1 + e j + 2 ( = ?) x j
CURS_1_MDF_2012/2013 19

Derivarea numeric
Schem simetric cu 5-puncte
0 1/x
d a j 2 + b j 1 + c j + d j +1 + e j + 2 = ( a + b + c + d + e ) j + ( 2a b + d + 2e ) ( x ) dx j 0 0 + ( 4a + b + d + 4e )

( x )

x ) d 3 d 2 ( + ( 8a b + d + 8e ) 2! dx 2 j 3! dx 3 j
2 3

+ (16a + b + d + 16e )

( x )

x ) d 5 d 4 ( + ( 32a b + d + 32e ) 4! dx 4 j 5! dx 5 j
4 5

+ ( 64a + b + d + 64e )

( x )

d 6 + LL 6! dx 6 j a + b + c + d

CURS_1_MDF_2012/2013

+e=0 2a b + d + 2e = 1/ x 4 a + b + d + 4e = 0 8a b + d + 8e = 0 16a + b + d + 16e = 0

20

Derivarea numeric
a + b + c + d + e = 0 2a b + d + 2e = 1/x 4 a + b + d + 4e = 0 8a b + d + 8e = 0 16a + b + d + 16e = 0 1 a = e = 12x c = 0 2 b = d = 3x

Schem simetric cu 5-puncte


4 5 1 x d d 8 8 = + ( ) 5 + H j 1 j +1 j+2 dx 12x j 2 j 30 dx

CURS_1_MDF_2012/2013

21

Derivarea numeric
Derivata a II a: Schema simetric de ordinul II

d 2 2 a b c O x ( ) = + + + 2 j 1 j j +1 dx j

CURS_1_MDF_2012/2013

22

Derivarea numeric
Derivata a II a: Schema simetric de ordinul II 1 b = d = x 2 b + c + d = 0 2 b + d = c = 0 2 x 2 2/ b d x + = a = e = 0 Schem simetric cu 3-puncte pentru derivata II
2 4 d 2 1 x d = + 2 2 4 + H j j +1 ) 2 ( j 1 dx j x 12 dx
CURS_1_MDF_2012/2013 23

Derivarea numeric
Derivata a II a

a + b + c + d + e = 0 2a b + d + 2e = 0 2 a + b + d + e = x 2/ 4 4 8a b + d + 8e = 0 16a + b + d + 16e = 0

1 a = e = 12x 2 4 b = d = 2 x 3 5 c = 2x 2

Schem simetric cu 5-puncte pentru derivata II


4 6 d 2 1 x d 16 30 16 = + + 2 6 j 2 j 1 j j +1 j +2 ) 2 ( 12 90 dx x j dx
CURS_1_MDF_2012/2013 24

Derivarea numeric
Metoda Grile j-2

coeficienilor nedeterminai neuniforme


j-1
x j 2 x j 1

j+1
x j x j +1

j+2

CURS_1_MDF_2012/2013

25

Derivarea numeric

Metoda coeficienilor nedeterminai Grile neuniforme(pas variabil)


2 3 4 d ( x j 1 ) d ( x j 1 ) d ( x j 1 ) d 2 3 + 4 +L + 2! dx j 3! dx j 4! dx j dx j 2 3 4 2 2 3 3 4

j 1 = j ( x j 1 ) j +1 = j + ( x j )

4 d ( x j ) d ( x j ) d ( x j ) d 2 + 3 + 4 +L + 2! dx j 3! dx j 4! dx j dx j

a j 1 + b j + c j +1 = ?
CURS_1_MDF_2012/2013 26

Derivarea numeric
Metoda General
j-2
Tipuri de scheme

j-1
x j 2 x j 1

j+1
x j x j +1

j+2

Schem simetric cu 3-puncte

d m dx = a j 1 + b j + c j +1 + O(x ) j

d m = + + + ( ) a b c O x j j j + 1 + 2 Schem asimetric cu 3-puncte dx j d m = + + + ( ) a b c O x 1 2 j j j Schem asimetric cu 3-puncte dx j d n m = + + + + a b c d O x ( ) Schem asimetric cu 4-puncte 1 1 2 j j j j + + dx j



CURS_1_MDF_2012/2013

Schem simetric cu 5-puncte

d O (x m ) dx = a j 2 + b j 1 + c j + d j +1 + e j + 2 + 27 j

Derivarea numeric
Schem simetric cu 3-puncte cu gril neuniform 0 d d dx = a j 1 + b j + c j +1 = ( a + b + c ) j + ( ax j 1 + cx j ) d x j j
+ ax
0 1

( (

2 j 1

+ cx

2 j

) )

1d 3 3 1 d + ax j 1 + cx j 2 3 2! d x j 3! d x j
2

4 + ax 4 + c x j 1 j

1 d 4 + LL 4 4! d x j

CURS_1_MDF_2012/2013

a + b + c = 0 ax j 1 + cx j = 1 2 2 a x c x + j 1 j =0

28

Derivarea numeric

Soluia sistemului
a + b + c = 0 ax j 1 + cx j = 1 2 2 a x c x + j 1 j =0

Schem simetric cu 3-puncte


d dx = j

x j a = x j 1 (x j + x j 1 ) 2 x x 2 j 1 j b = x j 1x j (x j + x j 1 ) x j 1 c = x j (x j + x j 1 )

( x j 1 ) j +1 ( x j ) j 1 + x 2j x 2j 1 j
2 2

x j 1x j ( x j 1 + x j )

x j 1x j d 3 + 3 + .. 6 dx j

CURS_1_MDF_2012/2013

29

Derivarea numeric
Schem asimetric cu 3-puncte 0
0 1

d a j + b j +1 + c j + 2 = ( a + b + c ) j + bx j + c ( x j + x j +1 ) d x j

+ bx + c ( x j + x j +1 )
2 j

{ {

} }

3 3 1 d 1 d 2 3 + bx j + c ( x j + x j +1 ) 2 2! d x j 3! dx 3 j

+ bx + c ( x j + x j +1 )
4 j

1 d 4 4 + LL 4! dx j

CURS_1_MDF_2012/2013

a + b + c = 0 bx j + c ( x j + x j +1 ) = 1 2 2 bx j + c ( x j + x j +1 ) = 0

30

Derivarea numeric

Soluia sistemului
a + b + c = 0 bx j +1 + c ( x j +1 + x j + 2 ) = 1 2 bx 2 j +1 + c ( x j +1 + x j + 2 ) = 0

Schem asimetric cu 3-puncte


d = d x j x j +1 ( 2x j + x j +1 ) j + ( x j + x j +1 ) j +1 ( x j ) j + 2
2 2

(2x j +1 + x j + 2 ) a = x j +1 (x j +1 + x j + 2 ) x j +1 + x j + 2 b= x j +1x j + 2 x j +1 c = x j + 2 (x j +1 + x j + 2 )

x j x j +1 ( x j +1 + x j )

x j 1 (x j +1 + x j ) d 3 + + ... 3 6 x j
CURS_1_MDF_2012/2013 31

Derivarea numeric cu diferene napoi

Derivarea numeric
Derivata de ordinul I

f ( x1 ) f ( x 0 ) f '( x 0 ) = + O( h ) h f '( x 0 ) = f ( x1 ) f ( x1 ) + O( h 2 ) 2h

Diferene nainte de ord. 1

Diferene centrate de ord. 2

f ( x 2 ) + 4 f ( x1) 3 f ( x 0 ) f '( x 0 ) = + O( h 2 ) 2h

Diferene napoi de ord 2

f ( x 2 ) + 8 f ( x1 ) + 8 f ( x1 ) 3 f ( x2 ) f '( x 0 ) = + O( h 4 ) 12h
CURS_1_MDF_2012/2013

Diferene centrate de ord IV


32

Derivarea numeric cu diferene napoi

Derivarea numeric
Derivata de ordinul II

f ( x 2 ) 2 f ( x1 ) + f ( x 0 ) f ''( x 0 ) = + O( h ) 2 h f ( x1 ) 2 f ( x 0 ) + f ( x1 ) 2 f ''( x 0 ) = + O ( h ) 2 h

Diferene nainte de ord. 1

Diferene centrate de ord. 2

f ( x 3 ) + 4 f ( x 2 ) 5 f ( x1) + 2 f ( x 0 ) 2 f ''( x 0 ) = + O ( h ) 2 h
Diferene napoi de ord 2

f ( x 2 ) + 16 f ( x1 ) 30 f ( x 0 ) + 16 f ( x1 ) f ( x2 ) 4 f ''( x 0 ) = + O ( h ) 2 12 h
CURS_1_MDF_2012/2013

Diferene centrate de ord IV


33

Exemplu-derivata calculat cu 25p


Funcia Runge :

1 f ( x) = 1 + 25 x 2
f ( x1 ) f ( x1 ) f '( x 0 ) = + O( h 2 ) 2h

25 points

CURS_1_MDF_2012/2013

34

Exemplu-derivata calculat cu 25p


Funcia Runge :

1 f ( x) = 1 + 25 x 2
f ( x1 ) f ( x1 ) f '( x 0 ) = + O( h 2 ) 2h

50 points

CURS_1_MDF_2012/2013

35

Extrapolarea Richardson
Derivata numeric depinde de mrimea pasului, h. Ideal: Obinerea unui pas care s tind la zero!!! Nu este uor deoarece apar costuri: erori mari de calcul i timpul de calcul crete foarte mult! Totui, se poate estima o valoare aproximativ pentru varianta n care pasul ar fi apropiat de zero. Extrapolarea Richardson.
CURS_1_MDF_2012/2013 36

Extrapolarea Richardson
Fie F(h) valoarea pe care o dorim calculat la pasul h. Presupunem c:

F (h) = Fexact + a1h p + O(h r )


cu r > p Presupunem c se cunoate p i r, dar nu Fexact i a1 Se observ c atunci cnd h -- > 0 s-ar obine valoarea dorit cu pasul cel mai mic.

F (0) = Fexact
CURS_1_MDF_2012/2013 37

Extrapolarea Richardson
Presupunem c F s-a calculat cu doi pai diferii, h i h/q , q numr ntreg. Avem

F (h) = Fexact + a1h p + O(h r )


F (h / q ) = Fexact + a1 ( h / q ) + O (h r ) =
p

= a0 + a1q p h p + O( h r )
Deci Fexact
Fexact q p F ( h) F ( h / q ) r = + O ( h ) p q 1

Valoarea mbuntit a lui F este de ordinul O(hr).

CURS_1_MDF_2012/2013

q p F ( h) F ( h / q ) Fimbunatait (h) = q p 1

38

Extrapolarea Richardson
Exemplu la extrapolarea Richardson pentru mbuntirea preciziei a derivatei numerice pentru sin(x) n x = 1. Folosim diferena nainte de ordinul nti: p=1

F (h) = a0 + a1h1 + O( h 2 )

r=2

sin(1.5) sin(1) = 0.312048 F ( h) = 0.5 sin(1.25) sin(1) = 0.430055 F ( h /2) = 0.25


CURS_1_MDF_2012/2013 39

Extrapolarea Richardson
sin(1.5) sin(1) = 0.312048 0.5 sin(1.25) sin(1) = 0.430055 F ( h /2) = 0.25 F ( h ) F ( h /2) F (0) = a0 = F ( h ) + = 2 F ( h /2) F ( h ) = 0.548061 (1/2) 1
F ( h) =
Pentru comparaie valoarea exact cos(1)=0.540302

Dup mai multe iteraii se poate obine:


CURS_1_MDF_2012/2013

F (0) = 0.540901

40

Derivarea numeric
Erori de ordinul h Derivarea numeric cu diferene napoi

CURS_1_MDF_2012/2013

dyi 1 = h ( yi yi 1 ) + O(h ) dx d 2 yi 1 = h 2 ( yi 2 yi 1 + yi 2 ) + O(h ) 2 dx d 3 yi 1 = h3 ( yi 3 yi 1 + 3 yi 2 yi 3 ) + O(h ) 3 dx d 4 yi 1 = h 4 ( yi 4 yi 1 + 6 yi 2 4 yi 3 + yi 4 ) + O(h ) 4 dx

41

Derivarea numeric
Erori de ordinul h2

Derivarea numeric cu diferene napoi

dyi 1 = 2 h (3 yi 4 yi 1 + yi 2 ) + O h 2 dx d 2 yi 1 2 ( ) y y y y O h = 2 5 + 4 + i i 1 i2 i 3 2 h2 dx d 3 yi 2 1 ( ) y y y y y O h = 5 18 + 24 14 + 3 + i i 1 i 2 i 3 i 4 3 2 h3 dx d 4 yi 1 2 ( ) = 3 y 14 y + 26 y 24 y + 11 y 2 y + O h i i 1 i 2 i 3 i 4 i 5 4 h4 dx

( )

( )

( )

( )
42

CURS_1_MDF_2012/2013

Derivarea numeric
Derivarea diferene finite centrate
Erori de ordinul h2

dyi 1 2 = 2 h ( yi +1 yi 1 ) + O h dx d 2 yi 1 2 ( ) = 2 + + y y y O h i +1 i i 1 2 h2 dx 3 d yi 2 1 ( ) = 2 + 2 + y y y y O h i+2 i +1 i 1 i 2 3 2 h3 dx 4 d yi 1 2 ( ) = y 4 y + 6 y 4 y + y + O h i+2 i +1 i i 1 i 2 4 h4 dx

( )

( )

( )

( )
43

CURS_1_MDF_2012/2013

Derivarea numeric
Erori de ordinul h4
dyi 4 1 ( ) y y y y O h = 12 + 8 8 + + i+2 i +1 i 1 i 2 h dx d 2 yi 4 1 ( ) y y y y y O h = + 16 30 + 16 + 2 i+2 i +1 i i 1 i 2 dx 2 12 h d 3 yi 4 1 ( ) = y + 8 y 13 y + 13 y 8 y + y + O h 3 i +3 i+2 i +1 i 1 i 2 i3 dx 3 8 h d 4 yi 4 1 ( ) = y + 12 y 39 y + 56 y 39 y + 12 y y + O h 4 i +3 i+2 i +1 i i 1 i2 i 3 dx 4 6 h

( )

( )

( )

( )

CURS_1_MDF_2012/2013

44

Exemple de diferene finite n 3D


Exemplu pentru derivatele pariale mixte
2u xdy u = y x 1 = ui +1, j , k ui 1, j , k ) + O x 2 ( y 2x i , j ,k 1 1 1 2 2 = + + u u u u O x y ( ) ( ) 1, 1, 1, 1, 1, 1, 1, 1, i + j + k i j + k i + j k i j k 2x 2y 2x 1 = ui +1, j +1, k ui 1, j +1, k ui +1, j 1, k + ui 1, j 1, k ) + O x 2 + y 2 ( 4xy

i , j ,k

CURS_1_MDF_2012/2013

45

Exemple de diferene finite n 3D


Necesit reele 2D i 3D n 2 i 3 variabile independente respectiv:
u x =
i , j ,k

1 ui +1, j , k ui 1, j , k ) + O x 2 ( 2x

) ( )

2u x 2

=
i , j ,k

( x )

(u

i +1, j , k

2ui , j , k + ui 1, j , k ) + O x 2

Analog se aplic i termenilor:


CURS_1_MDF_2012/2013

u 2 u u 2u , 2, , 2 y y z z
46

Grile pentru diferene finite

CURS_1_MDF_2012/2013

47

Derivate
u x

Diferene centrale

Eroarea de trunchiere

i ,

j , k

1 (u i +1, j , k u i 1, j , k ) 2 x

O (x 2 )

u y
u z

i , j , k

1 (u i , j +1, k u i , j 1, k ) 2 y

O(y )
2

i ,

j , k

1 (u i , j , k +1 u i , j , k 1 ) 2z

O(z )
2

2 u x 2

i ,

j , k

1 (ui +1, j ,k 2ui , j ,k + ui 1, j ,k ) 2 x


1 (ui , j +1,k 2ui , j ,k + ui , j 1,k ) 2 y 1 (ui , j ,k +1 2ui , j , k + ui , j ,k 1 ) 2 z
1 (ui+1, j +1,k ui1, j +1,k ui +1, j 1,k + ui 1, j 1,k ) 4xy

O (x 2 )

2 u y 2 2 u z 2
u y x
2

O(y )
2

i , j , k

O(z )
2

i , j , k

CURS_1_MDF_2012/2013
i , j ,k

O(x2 + y2 )
48

Derivate
u x

Diferene finite nainte

Eroarea de trunchiere

i ,

j , k

1 ( u i +1, j , k u i , j , k ) x

O (x )

u y
u z

i , j , k

1 ( u i , j +1, k u i , j , k ) y
1 ( u i , j , k +1 u i , j , k ) z
1 ( u i + 2 , j , k 2 u i +1, j , k + u i , j , k ) 2 x
1 ( u i , j + 2 , k 2 u i , j + 1, k + u i , j , k ) y 2

O(y) O(z)
O (x )

i ,

j , k

2 u x 2

i ,

j , k

2 u y 2 2 u z 2
2u y x

O(y) O(z) O(x + y)


49

i , j , k

i , j , k

1 (u i , j , k + 2 2u i , j , k +1 + u i , j , k ) 2 z

i , j ,k

1 (ui+1, j+1,k ui, j+1,k ui+1, j,k + ui, j,k ) 4xy

CURS_1_MDF_2012/2013

Derivate
u x

Diferene finite napoi

Eroarea de trunchiere

i ,

j , k

1 ( u i , j , k u i 1, j , k ) x

O (x )

u y
u z

i , j , k

1 ( u i , j , k u i , j 1, k ) y
1 ( u i , j , k u i , j , k 1 ) z
1 ( u i , j , k 2 u i 1 , j , k + u i 2 , j , k ) 2 x
1 ( u i , j , k 2 u i , j 1 , k + u i , j 2 , k ) y 2

O(y) O(z)
O (x )

i ,

j , k

2 u x 2

i ,

j , k

2 u y 2 2 u z 2

O(y) O(z) O(x + y)


50

i , j , k

i , j , k

1 (u i , j , k 2u i , j , k 1 + u i , j , k 2 ) 2 z

2u y x i, j ,k CURS_1_MDF_2012/2013

1 (ui, j ,k ui, j 1,k ui1, j ,k + ui 1, j 1,k ) xy

S-ar putea să vă placă și