Você está na página 1de 15

Diferena finita regressiva de 2 ordem

Polinmio interpolador nos ns x0, x1, x2 tabela diferenas divididas


x0

y0
y[ x0 , x1 ] =

x1

y1
y[ x1 , x2 ] =

x2

y1 y0
x1 x0

y2

y2 y1
x2 x1

y2 y1 y1 y0

x2 x1 x1 x0
y[ x0 , x1 , x2 ] =
x2 x 0

p(x)

x0

x1

x2

p(x) = y0 + y[ x0 , x1 ] (x x0 ) + y[ x0 , x1 , x2 ] (x x0 ) (x x1 )
p '(x) = y[ x0 , x1 ] + y[ x0 , x1 , x2 ] ( (x x1 ) + (x x0 ))
p ''(x) = 2 y[ x0 , x1 , x2 ]
Matemtica Computacional, MEMec, LEAN, MEAer

Diferena finita regressiva de 2 ordem


p '(x) = y[ x0 , x1 ] + y[ x0 , x1 , x2 ] ( (x x1 ) + (x x0 ))
y2 y1 y1 y0

y1 y0 x2 x1 x1 x0
+
( (x x1 ) + (x x0 ) )
p '(x) =
x1 x0
x2 x 0

Considerando ns equidistantes, h=x1 x0, h=x2 x1


y2 y1 y1 y0

y1 y0
h
h ((x x ) + (x x ))
+
p '(x) =
1
0
h
2h

p '(x) =

h
x0

h
x1

x2

y1 y0 y2 2y1 + y0
+
( (x x1 ) + (x x0 ) )
2
2h
h

y2 y1 y1 y0
y2 y1 y1 y0

x2 x1 x1 x0
h
h = y2 2y1 + y0
= 2
p ''(x) = 2 y[ x0 , x1 , x2 ] = 2
x2 x 0
2h
h2
Matemtica Computacional, MEMec, LEAN, MEAer

Diferena finita regressiva de 2 ordem


Particularizando para x=x2, resulta

y1 y0 y2 2y1 + y0
+
(x2 x1 ) + (x2 x0 )
p '(x2 ) =
2

2h
h
h
2h

p '(x2 ) =

y1 y0 y2 2y1 + y0
+
( h + 2h )
2
2h
h

p '(x2 ) =

y1 y0
y 2y1 + y0
+3 2
h
2h

p '(x2 ) =

3y2 4 y1 + y0
2h

p ''(x2 ) =

y2 2y1 + y0
h2

p(x)

x0

x1

x2
x

A diferena finita designa-se por


regressiva porque os ns utilizados
so o ponto onde calculamos a
derivada e pontos para trs
Matemtica Computacional, MEMec, LEAN, MEAer

Diferena finita regressiva de 2 ordem


Expanso em srie de Taylor de ordem 2 com resto de ordem 3
f (x h) = f (x) + f '(x) (h) +

f ''(x)
f '''(1 )
(h)2 +
(h)3
2
6
f (x h) = f (x) f '(x) h +

f (x 2h) = f (x) + f '(x) (2h) +

f ''(x) 2 f '''(1 ) 3
h
h
2
6

(*)

f ''(x)
f '''(2 )
(2h)2 +
(2h)3
2
6

f (x 2h) = f (x) 2 f '(x) h + 4

f ''(x) 2
f '''(2 ) 3
h 8
h
2
6

(**)

Efectuando (**) 4(*), de modo a anular o termo em f (x), resulta


(**)
4 (*)
(**) 4 (*)

f ''(x) 2
f '''(2 ) 3
h 8
h
2
6
f ''(x) 2
f '''(1 ) 3
4 f (x h) = 4 f (x) 4 f '(x) h + 4
h 4
h
2
6
f (x 2h) =

f (x) 2 f '(x) h + 4

f (x 2h) 4 f (x h) = 3 f (x) + 2 f '(x) h

f '''(1 ) 3
f '''(2 ) 3
h +4
h
6
6

Matemtica Computacional, MEMec, LEAN, MEAer

Diferena finita regressiva de 2 ordem


Desenvolvendo
f (x 2h) 4 f (x h) = 3 f (x) + 2 f '(x) h 8

f '''(1 ) 3
f '''(2 ) 3
h +4
h
6
6

f (x 2h) 4 f (x h) = 3 f (x) + 2 f '(x) h 4


f '(x) =

f '''( ) 3
h
6

[ x 2h, x ]

f (x 2h) 4 f (x h) + 3 f (x) f '''( ) 2


+
h
2h

Dh f ( x )

Erro

Diferena finita regressiva de 2 ordem e respectivo erro (de mtodo)

Dh f (x) =

f (x 2h) 4 f (x h) + 3 f (x)
2h

E2 '(x) =

f '''( ) 2
h
3

Matemtica Computacional, MEMec, LEAN, MEAer

Primeira ordem
Segunda ordem

Segunda ordem

Segunda derivada

Primeira derivada

Resumo das principais diferenas finitas


Progressiva

Dh f (x) =

f (x + h) f (x)
h

1
E1 '(x) = h f ''( )
2

Regressiva

Dh f (x) =

f (x) f (x h)
h

1
E1 '(x) = h f ''( )
2

f (x + h) f (x h)
2h

1
E1 '(x) = h2 f '''( )
6

Dh f (x) =

Central

Progressiva

Dh f (x) =

f (x + 2h) + 4 f (x + h) 3 f (x)
2h

1
E2 '(x) = h2 f '''( )
3

Regressiva

Dh f (x) =

3 f (x) 4 f (x h) + f (x 2h)
2h

1
E2 '(x) = h2 f '''( )
3

Progressiva

Dh2 f (x) =

f (x + 2h) 2 f (x + h) + f (x)
h2

E2 ''(x) = h f '''( )

Regressiva

Dh2 f (x) =

f (x) 2 f (x h) + f (x 2h)
h2

E2 ''(x) = h f '''( )

Central

f (x + h) 2 f (x) + f (x h)
D f (x) =
h2
2
h

E2 ''(x) =

1 2
h f ''''( )
12

Matemtica Computacional, MEMec, LEAN, MEAer

Formula de Aitken-Neville
x0

x1

xn

xn+1

pn+1 (x) = pn ( x) + an+1 Wn (x) = pn (x) + y[ x0 , x1 ,... xn , xn+1 ] Wn (x)

p0,n
x0

x1

x2

xn-1 xn xn+1
p1,n
p0,n+1

Formula de Aitken-Neville
p0 ,n+1 (x) = p0 ,n (x) +

(x x0 ) p1,n (x) p0,n (x)

xn+1 x0

Matemtica Computacional, MEMec, LEAN, MEAer

Formula de Aitken-Neville
Exemplo: n=2
p0,3(x)

p1,2(x)

p0,2(x)

x0

x1

x3

x2

Formula de Aitken-Neville

p0 ,3 (x) = p0,2 (x) +

(x x0 ) p1,2 (x) p0 ,2 (x)

x3 x 0

Matemtica Computacional, MEMec, LEAN, MEAer

Formula de Aitken-Neville
Generalizando
pm,k
x0

xm

x1

xm+1

xm+k

xm+k+1

pm+1,k
pm,k+1

Formula de Aitken-Neville
pm ,k +1 (x) = pm ,k (x) +

(x xm ) pm+1,k (x) pm ,k (x)

xm+k +1 xm

Matemtica Computacional, MEMec, LEAN, MEAer

Formula de Aitken-Neville
pm ,k +1 (x) = pm ,k (x) +

(x xm ) pm+1,k (x) pm ,k (x)

xm+k +1 xm

Se pretendermos efectuar o clculo do polinmio para x=0 resulta,


pm ,k +1 (0) = pm ,k (0) +

pm ,k +1 (0) = pm ,k

pm ,k +1 (0) =

(0 xm ) pm+1,k (0) pm ,k (0)

xm+k +1 xm

x
(
(0) +

pm ,k (0) xm pm+1, k (0)

xm+k +1 xm

xm+k +1 pm ,k (0) xm pm+1, k (0)


xm+k+1 xm

Matemtica Computacional, MEMec, LEAN, MEAer

Extrapolao de Richardson
Expanso em srie

f (x + h) = f (x) + f '(x) h +

f ''(x) 2 f '''(x) 3
h +
h + ...
2!
3!

f (x + h) f (x) f ''(x)
f '''(x) 2
f (x + h) f (x)
f '(x) =

h
h ... f '(x) =
+
h
2!
3!
h

C i hi

i =1

f '(x)

f (x + h) f (x)
+
C i hi = p(h)
h
i =1

A diferena finita o termo de ordem


zero do polinmio na varivel h

polinmio na varivel h

Extrapolao de Richardson:
Sucesso de valores de h: hm, hm+1, , hm+k
Calcular diferenas finitas para cada valor de h > termos de ordem zero dos polinmios
Usar Aitken-Neville para calcular os valores do polinmio em h=0 (extrapolao)
pm ,k +1 (0) =

xm+k +1 pm ,k (0) xm pm+1,k (0)


xm+k +1 xm

Dm ,k +1 =

hm+k +1 Dm ,k hm Dm+1,k
hm+k+1 hm

Matemtica Computacional, MEMec, LEAN, MEAer

Extrapolao de Richardson
Exemplo: f(x)=exp(x), calcular f (1) utilizando extrapolao de Richardson

Sugesto: considerar h0=0.4, hm=h0/2m


h0 = 0.4 Diferena finita, D0 ,0 =
h1 =

Nota: Valor exacto, f (1)=exp(1)=2.718282

f (x + h) f (x) f (1.4) f (1)


=
h
0.4

D0,0 = 3.342295

h0
f (x + h) f (x) f (1.2) f (1)
= 0.2 Diferena finita, D1,0 =
=
2
h
0.2

Dm ,k +1 =

hm+k+1 Dm ,k hm Dm+1,k
hm+k +1 hm

Tabela

Grfico
h0

h1 D0,0 h0 D1,0
h1 h0

0.2 3.342295 0.4 3.009175


0.2 0.4
D0,1 = 2.676055

D0,0

D0,0
D0,1

h1

D0,1 =

D1,0 = 3.009175

D1,0

D1,0
D0,1
h1

h0

Matemtica Computacional, MEMec, LEAN, MEAer

Extrapolao de Richardson
Novo ponto, h2=h0/22=0.1
Tabela

h0

Grfico

D0,0

D2,0

D1,0

D0,0
D0,1

h1

D1,0

D0,2

D0,2

D1,1

D1,1
h2

h2 =

D0,1
h2

D2,0

h1

h0

h0
f (x + h) f (x) f (1.1) f (1)
=
0.1

Diferena
finita,
D
=
=
= 2.858842
2 ,0
2
2
h
0.1

Dm ,k +1 =

hm+k+1 Dm ,k hm Dm+1,k
hm+k +1 hm
D1,1 =

h2 D1,0 h1 D2,0
h2 h1

0.1 3.009175 0.2 2.858842


= 2.708509
0.1 0.2

0.1 2.676055 0.4 2.708509


= 2.719327
0.1 0.4

Valor exacto,
f (1) =2.718282

D0,2 =

h2 D0,1 h0 D1,1
h2 h0

Matemtica Computacional, MEMec, LEAN, MEAer

Extrapolao de Richardson
Tabela

Valor exacto,

h0 = 0.4 D0,0 = 3.342295

f (1) =2.718282
D0,1 = 2.676055
D0,2 = 2.719327

h1 = 0.2 D1,0 = 3.009175


D1,1 = 2.708509
h2 = 0.1 D2,0 = 2.858842

Grfico
D0,0

diferenas
finitas
D2,0

D1,0

D0,2
D1,1

D0,1
h2

h1

h0

Matemtica Computacional, MEMec, LEAN, MEAer

Extrapolao de Richardson
Se usarmos diferenas finitas centrais a srie de potencias de h s tem potncias pares
f ''(x) 2 f '''(x) 3
h +
h + ...
2!
3!
f ''(x) 2 f '''(x) 3
f (x h) = f (x) f '(x) h +
h
h + ...
2!
3!
f '''(x) 3
f (x + h) f (x h) = 2 f '(x) h + 2
h + ...
3!
f (x + h) = f (x) + f '(x) h +

f '(x) =

f (x + h) f (x h) f '''(x) 2 f '''''(x) 4
f (x + h) f (x h)

h
h ... f '(x) =
+
2h
3!
5!
2h

f '(x)

C i h2 i

i =1

f (x + h) f (x h)
+
C i h2i = p(h2 )
2h
i =1

polinmio na varivel h2

A convergncia mais rpida e a formula de Aitken-Neville adaptada resulta


pm ,k +1 (0) =

xm+k +1 pm ,k (0) xm pm+1,k (0)


xm+k +1 xm

Dm ,k +1 =

hm2 +k +1 Dm ,k hm2 Dm+1,k


hm2 +k+1 hm2

Matemtica Computacional, MEMec, LEAN, MEAer

Você também pode gostar