Вы находитесь на странице: 1из 6

Formul ario de C alculo Num erico

F ormula de Lagrange : pn (x) = (x x0 )(x x2 ) . . . (x xn ) (x x1 )(x x2 ) . . . (x xn ) f (x0 ) + f (x1 ) + . . . + (x0 x1 )(x0 x2 ) . . . (x0 xn ) (x1 x0 )(x1 x2 ) . . . (x1 xn ) (x x0 )(x x1 ) . . . (x xn1 ) + f (xn ) (xn x0 )(xn x1 ) . . . (xn xn1 ) f (n+1) ( ) (n + 1)!

f (x )pn (x ) = (x x0 )(x x1 ) . . . (x xn ) Diferen cas divididas : f [xi , xj ] = f [xi , xi+1 , . . . , xi+k ] =

f (xj ) f (xi ) xj xi

f [xi , xi+1 , . . . , xi+k1 ] f [xi+1 , xi+2 , . . . , xi+k ] (xi xi+k )


k X j =0 k Y
l=0 l=j

f [xi , xi+1 , . . . , xi+k ] =

f (xi+j ) (xi+j xi+l )

f (k) ( ) (k)!

Diferen cas descendentes : Diferen cas ascendentes : Diferen cas centrais : Rela c ao entre as diferen cas :

fi = fi+1 fi fi = fi fi1 fi = fi+ 1 fi 1


2

k fi = k fi+ k = k fi+k
2

i, k {0, 1, . . . , n} f [xi+k , xi+k1 , . . . , xi ] = k fi+k k ! hk

k fi k ! hk F ormula de Newton com diferen cas divididas : f [xi , xi+1 , . . . , xi+k ] =

pn (x) = f0 + (x x0 )f [x0 , x1 ] + (x x0 )(x x1 )f [x0 , x1 , x2 ] + . . . . . . + (x x0 )(x x1 ) . . . (x xn1 )f [x0 , x1 , . . . , xn ] F ormula de Newton com diferen cas descendentes : f0 2 f0 n f0 + (x x0 )(x x1 ) + . . . + ( x x )( x x ) . . . ( x x ) 0 1 n 1 h 2! h2 n! h n 2 f0 n f0 x x0 pn (x0 + sh) = f0 + sf0 + s(s 1) + . . . + s(s 1) . . . (s n + 1) , s= 2! n! h pn (x) = f0 + (x x0 ) F ormula de Newton com diferen cas ascendentes : pn (x) = fn + (x xn ) (x xn )(x xn1 ) 2 (x xn )(x xn1 ) . . . (x x1 ) n fn + fn + . . . + fn h 2! h2 n! h n s(s + 1) 2 s(s + 1)(s + 2) 3 s(s + 1)(s + 2) . . . (s + n 1) n x xn pn (xn + sh) = fn + sfn + fn + fn + . . . + fn , s = 2! 3! n! h F ormula de Bessel com diferen cas centrais : pn (x0 + sh) =f0 + sf1/2 + B2 ( 2 f0 + 2 f1 ) + B3 3 f1/2 + B4 ( 4 f0 + 4 f1 ) + . . . + Bn x x0 h s(s 1) 2 2! B5 = s(s 1/2)(s 1) 3! n f1/2 ( n f0 + n f1 ) se n mpar se n par

s=

B2 =

B3 =

B4 =

(s + 1)s(s 1)(s 2) 2 4!

s(s + 1)s(s 1/2)(s 1)(s 2) 5! 1

Express ao do spline c ubico interpolador de f em x0 , x1 , . . . , xn no intervalo [xi , xi+1 ] : si (x) = (x xi )3 (xi+1 x)3 h2 (xi+1 x) h2 (x xi ) mi + mi+1 +(fi mi i ) +(fi+1 mi+1 i ) , 6hi 6hi 6 hi 6 hi i = 0, 1, . . . , n1

Sistema de equa c oes que garantem a continuidade de s (x) em xi , i = 1, 2, . . . , n 1 : (1) hi1 mi1 + 2(hi + hi1 )mi + hi mi+1 = bi , bi = 6( fi+1 fi fi fi1 ), hi hi1 i = 1, 2, . . . , n 1

hi = xi+1 xi ,

i = 0, 1, . . . , n 1,

mi = s (xi ),

i = 0, 1, . . . , n

Sistema de equa c oes para a determina c ao do spline c ubico (completo) que satisfaz as condi c oes s (x0 ) = f0 e s (xn ) = fn : Adicionar ` as equa c oes (1) : 2h0 m0 + h0 m1 = 6( f1 f0 f0 ) h0 fn fn1 ) hn1

hn1 mn1 + 2hn1 mn = 6(fn

Sistema de equa c oes para a determina c ao do spline c ubico com s (x0 ) = k0 e s (xn ) = kn Adicionar a (1) as equa c oes m0 = k0 e mn = kn . Se k0 = kn = 0 obt em-se o spline c ubico natural. Sendo s(x) a fun c ao spline c ubica completa ou a fun c ao spline c ubica natural, tem-se |f (x ) s(x )| h 2
3

Z
a

f
b

1 2 (t)dt
2

Z 1 f (x ) s (x ) h 2
a

1 2 (t)dt ,

h=

i=0,1,...,n1

max

(xi+1 xi ),

x [xo , xn ]

M etodo dos m nimos quadrados : Considere-se uma fun c ao tabelada por x f (x) x0 y0 x1 y1 ... ... xM yM

(a = x0 < x1 < . . . < xM = b) e seja Pn (x) = k=0 ak xk , o polin omio de grau n < M que melhor aproxima a fun c ao tabelada no sentido dos m nimos quadrados. Ent ao, os coecientes a0 , a1 , . . . , an s ao obtidos pelas equa c oes normais
M X i=0

Pn

a0

x0 i + a1 x1 i + a1 . . .

M X i=0 M X i=0

x1 i + a2 x2 i + a2

M X i=0 M X i=0

x2 i + . . . + an x3 i + . . . + an

M X i=0 M X i=0

xn i =

M X i=0

yi x0 i, yi x1 i,

a0

M X i=0

+1 xn = i

M X i=0

a0

M X i=0

xn i + a1

M X i=0

+1 xn + a2 i

M X i=0

+2 xn + . . . + an i

M X i=0

n x2 i =

M X i=0

yi xn i .

F ormulas de integra c ao e respectivos erros : n 1


x0

F ormula de Newton-Cotes fechada Z


x1

Erro h3 f ( ) 12 h5 (4) f ( ) 90 3h5 (4) f ( ) 80 8h7 (6) f ( ) 945 275h7 (6) f ( ) 12096 9h9 (8) f ( ) 1400

f (x)dx Z
x2

h (f0 + f1 ) 2

(Regra dos Trap ezios)

2
x0

f (x)dx Z
x3

h (f0 + 4f1 + f2 ) 3

(Regra de Simpson)

3
x0

f (x)dx Z
x4

3h (f0 + 3f1 + 3f2 + f3 ) 8

(Regra dos 3/8)

4
x0

f (x)dx Z
x5

2h (7f0 + 32f1 + 12f2 + 32f3 + 7f4 ) 45

(Regra de Milne)

5
x0

f (x)dx Z
x6

5h (19f0 + 75f1 + 50f2 + 50f3 + 75f4 + 19f5 ) 288 h (41f0 + 216f1 + 27f2 + 272f3 + 27f4 + 216f5 + 41f6 ) 140 (Regra de Weddle)

6
x0

f (x)dx

n 0

F ormula de Newton-Cotes aberta Z


x1

Erro h3 f ( ) 3 3h3 f ( ) 4 14h5 (4) f ( ) 45 95h7 (4) f ( ) 144

f (x)dx 2hf0
x1

Z 1

x2

f (x)dx
x1

3h (f0 + f1 ) 2 4h (2f0 f1 + 2f2 ) 3 5h (11f0 + f1 + f2 + 11f3 ) 24

Z 2

x3

f (x)dx
x1

Z 3

x4

f (x)dx
x1

F ormulas do m etodo de Romberg T0


(k )

1 1 = h[ f (a) + f (a + h) + . . . + f (b h) + f (b)] 2 2

k = 0, 1, 2, . . . h= ba 2k n = 1, 2, . . .

k) T( n =

Tn1 T 4n Tn1 Tn1 (k+1) = Tn1 + n1 n n 4 1 4 1

(k+1)

(k )

(k+1)

(k )

k = 0, 1, 2, . . .

M etodos de resolu c ao da equa c ao f (x) = 0 : 1) M etodo de Newton xn+1 = xn f (xn ) , n = 0, 1, 2, . . . f (xn ) , | xn | M2 (xn xn1 )2 , 2m1 e | xn | M2 ( xn1 )2 2m1

onde designa a ra z separada em [a, b], 2) M etodo da Secante xn+1 =

0 < m1 |f (x)|[a,b]

M2 |f (x)|[a,b] .

f (xn )xn1 f (xn1 )xn f (xn )(xn xn1 ) = xn , n = 1, 2, . . . f (xn ) f (xn1 ) f (xn ) f (xn1 ) M2 | xn+1 | | xn | | xn1 | , onde M2 e m1 t em o signicado explicitado a prop osito do 2m1 3

m etodo de Newton.

3) M etodo do ponto xo : Teorema : Seja C([a, b]) e : [a, b] [a, b]. Supondo que existe em ]a, b[ e (x) k < 1 x ]a, b[ a sucess ao denida por x0 [a, b] xn = (xn1 ) n = 1, 2, . . .

converge para o u nico ponto xo [a, b]. Corol ario : Se satisfaz as condi c oes do teorema, ent ao | xn | kn |x0 x1 | 1k e | xn | k |xn xn1 | , para n 1. 1k

Normas de Vectores e Normas T de Matrizes Dado X = x1 x2 . . . xn vamos considerar as normas seguintes : 1) 2) X x

= max |xi |
i n X i=1

|xi |

As normas matriciais a) e b) denidas a seguir, s ao subordinadas ` as normas vectorias 1) e 2), respectivamente. Sendo A uma matriz quadrada de ordem n de elemento gen erico aik , n X a) A = max |aik |
i k=1 n X i=1

b)

= max
k

|aik |

M etodo iterativo geral para resolu c ao de sistemas de equa c oes lineares Considere-se o seguinte sistema de equa c oes lineares na forma matricial AX = B . Fa ca-se A = N P , com N regular. O sistema e equivalente a X = GX + H , com G = N 1 P e H = N 1 B . Se X e a solu c ao do sistema AX = B e X (j ) s ao obtidos a partir da rela c ao X (j +1) = GX (j ) + H, j = 0, 1, . . . , (j ) ent ao, se G < 1, ent ao a sucess ao de iteradas X e convergente para X . Tem-se ainda : G j (1) (0) X X 1 G G (j ) (j 1) (j ) X X X X 1 G G j (j ) j (0) H X X G X + 1 G (j ) X X M etodos particulares 1) Jacobi Fazer no m etodo geral, G = D1 (L + U ) e H = D1 B . 2) Gauss-Seidel Fazer no m etodo geral, G = (D + L)1 U e H = (D + L)1 B , sendo em ambos os casos L a matriz triangular inferior em sentido estrito e U a matriz triangular superior em sentido estrito . Nota: 2 4 b c a 0 31 5 2 6 =6 4
1 a b ac

0
1 c

3 7 7 (ac = 0) 5 ;

0 c e

31

2 6 6 =6 6 4

1 a b ac becd acf

0
1 c e cf

6 6 6 b 6 4 d 4

7 7 0 7 7 5 f

7 7 0 7 7 (acf = 0) 5
1 f

0 c e h

0 0 f i

31

2 6 6 6 6 =6 6 6 6 4

1 a b ac becd acf bf h+cdicf g bei acf j

0
1 c e cf eif h cf j

0 0
1 f i fj

6 6 6 b 6 6 6 6 d 6 4 g

7 7 0 7 7 7 7 0 7 7 5 j

7 7 0 7 7 7 (acf j = 0) 7 0 7 7 5
1 j

Resolu c ao Num erica de Equa c oes Diferenciais M etodo de Taylor de ordem n onde T (n) (ti , wi ) = f (ti , wi ) + Erro de truncatura local i+1 = y (n+1) (i ) hn , i ]ti , ti+1 [, y C n+1 ([a, b]) (n + 1)! h hn1 (n1) f (ti , wi ) + ... + f (ti , wi ). 2 n! w0 = wi+1 = wi + hT (n) (ti , wi ), ,

i = 0, 1, ..., N 1

M etodo de Runge-Kutta de ordem quatro 1 wi+1 = wi + (k1 + 2k2 + 2k3 + k4 ), 6 h k1 h k2 com k1 = hf (ti , wi ), k2 = hf ti + , wi + , k3 = hf ti + , wi + e k4 = hf (ti+1 , wi + k3 ), 2 2 2 2 i = 0, 1, ..., N 1 M etodos de Adams-Bashforth - M etodo de Adams-Bashforth(passo 2) ( w0 = 0 = , w1 = 1 h wi+1 = wi + [3f (ti , wi ) f (ti1 , wi1 )], i = 1, 2, ..., N 1 2 Erro de truncatura local 5 (3) i+1 = y (i )h2 , i ]ti1 , ti+1 [, y C 3 ([a, b]) 12 - M etodo de Adams-Bashforth(passo 3) ( w0 = 0 = , w1 = 1 , w2 = 2 h wi+1 = wi + [23f (ti , wi ) 16f (ti1 , wi1 ) + 5f (ti2 , wi2 )], i = 2, 3, ..., N 1 12 Erro de truncatura local 3 i+1 = y (4) (i )h3 , i ]ti2 , ti+1 [, y C 4 ([a, b]) 8 - M etodo de Adams-Bashforth (passo 4) 8 > < w0 = 0 = , w1 = 1 , w2 = 2 , w3 = 3 h wi+1 = wi + [55f (ti , wi ) 59f (ti1 , wi1 ) + 37f (ti2 , wi2 ) 9f (ti3 , wi3 )] > 24 : i = 3, 4, ..., N 1 Erro de truncatura local 251 (5) i+1 = y (i )h4 , i ]ti3 , ti+1 [, y C 5 ([a, b]) 720 5

- M etodo de Adams-Bashforth (passo 5) 8 w0 = 0 = , w1 = 1 , w2 = 2 , w3 = 3 , w4 = 4 > > > > < wi+1 = wi + h [1901f (ti , wi ) 2774f (ti1 , wi1 ) + 2616f (ti2 , wi2 )] 720 h > > [ 1274 f (ti3 , wi3 ) + 251f (ti4 , wi4 )], + > > : 720 i = 4, 5, ..., N 1 Erro de truncatura local 95 (6) i+1 = y (i )h5 , i ]ti4 , ti+1 [, y C 6 ([a, b]) 288 M etodos de Adams-Moulton - M etodo de Adams-Moulton (passo 2) ( w0 = 0 = , w1 = 1 h wi+1 = wi + [5f (ti+1 , wi+1 ) + 8f (ti , wi ) f (ti1 , wi1 )], i = 1, 2, ..., N 1 12 Erro de truncatura local 1 i+1 = y (4) (i )h3 , i ]ti1 , ti+1 [, y C 4 ([a, b]) 24 - M etodo de Adams-Moulton (passo 3) 8 > < w0 = 0 = , w1 = 1 , w2 = 2 h [9f (ti+1 , wi+1 ) + 19f (ti , wi ) 5f (ti1 , wi1 ) + f (ti2 , wi2 )] wi+1 = wi + > 24 : i = 2, 3, ..., N 1 Erro de truncatura local 19 (5) y (i )h4 , i ]ti2 , ti+1 [, y C 5 ([a, b]) i+1 = 720 - M etodo de Adams-Moulton (passo 4) 8 w = 0 = , w1 = 1 , w2 = 2 , w3 = 3 > > 0 < h wi+1 = wi + [251f (ti+1 , wi+1 ) + 646f (ti , wi ) 264f (ti1 , wi1 )] 720 > > h : + [106f (ti2 , wi2 ) 19f (ti3 , wi3 )], i = 3, 4, ..., N 1 720 Erro de truncatura local 3 (6) i+1 = y (i )h5 , i ]ti3 , ti+1 [, y C 6 ([a, b]) 160

Вам также может понравиться