Você está na página 1de 5

Exemplo

y’’(x) + 2y’(x) + y(x) = x


y(0) = 0
y(1) = -1

h = 1/n,
x1 = h, ... , xi = ih, ... , xn-1 = (n-1)h
Exemplo
y’’(xi) = (yi+1 – 2yi + yi-1)/h²
y’(xi) = (yi+1 – yi-1)/2h

(yi+1 – 2yi + yi-1)/h² + (yi+1 – yi-1)/2h + yi = xi


->
yi+1 – 2yi + yi-1 + hyi+1 – hyi-1 + h²yi = h²xi
como xi = ih ->
(1 – h)yi-1 + (h² - 2) yi + (1 + h) yi+1 = ih³
Exemplo

da condição inicial x0 = 0 e y(x0) = 0


(h² - 2)y1 + (1 + h)y2 = h³

(1 – h)y1 + (h² - 2)y2 + (1 + h) y3 = 2h³


...
(1 – h)yn-2 + (h² - 2)yn-1 = (n - 1)h³ + (1 + h)
Exemplo

(h² - 2)y1 + (1+h)y2 = h³


(1 - h)yi-1 + (h² - 2)yi +(1 + h)yi+1 = ih³
(1 - h)yn-2 + (h² - 2)yn-1 = (n–1)h³+h+ 1
Exemplo

d1 c 1
a2 d 2 c 2
a3 d 3 c 3
... ... ...
an-2 dn-2 cn-2
an-1 dn-1

Você também pode gostar