Professional Documents
Culture Documents
ESPE
Departamento de Ciencias Exactas
NRC: 1184
Vinicio Chuqui
5 de agosto de 2017
1
METODOS NUMERICOS
Solucion
Tenemos la ecuacion diferencial de la siguiente forma
00 0
y cy = f (x)
donde
y(a) = k1
y(b) = k2
A continuacion discretizamos el intervalo obteniendo:
ba
h=
n
donde n es el numero de subintervalos.
k=1
ch ch
y2 (1 ) 2y1 + y0 (1 + ) = h2 f (x1 )
2 2
2
METODOS NUMERICOS
k=2
ch ch
y3 (1 ) 2y2 + y1 (1 + ) = h2 f (x2 )
2 2
k=3
ch ch
y4 (1 ) 2y3 + y2 (1 + ) = h2 f (x3 )
2 2
k =n1
ch ch
yn (1 ) 2yn1 + yn2 (1 + ) = h2 f (xn1 )
2 2
Ay = F
ch
2 (1 )
2
0 0 0 0 0
(1 + ch ) ch
2 (1 ) 0 0 0 0
2 2
ch ch
0 (1 + ) 2 (1 ) 0 0 0
A=
2 2
ch ch
0 0 (1 + ) 2 (1 ) 0 0
. 2 2
. .. .. .. .. .. ..
. . . . . . .
ch
0 0 0 0 0 (1 + ) 2
2
y1
y2
y3
y=
y4
..
.
yn1
ch
h2 f (x1 ) k1 (1 + )
2
2
h f (x2 )
F =
h2 f (x3 )
h2 f (x4 )
..
.
ch
2
h f (xn1 ) k2 (1 )
2
3
METODOS NUMERICOS
Para 8 subintervalos:
ba 10 1
h= = =
n 8 8
Nuestro intervalo es:
1 1 3 1 5 3 7
I = [0 1]
8 4 8 2 8 4 8
Reemplazamos valores para crear nuestra matriz
ch 0,5(1/8) 31
(1 )=1 =
2 2 32
ch 0,5(1/8) 33
(1 + ) = 1 + =
2 2 32
31
2 0 0 0 0 0
32
33 31
2 0 0 0 0
32 32
33 31
0 2 0 0 0
32 32
33 31
A= 0 0 2 0 0
32 32
33 31
0 0 0 2 0
32 32
33 31
0 0 0 0 2
32 32
33
0 0 0 0 0 2
32
4
METODOS NUMERICOS
y1
y2
y3
y=
y4
y5
y6
y7
1
f (1/8) 0(33/32)
64
1
f (1/4)
64
1
f (3/8)
64
1
F = f (1/2)
64
1
f (5/8)
64
1
f (3/4)
64
1
f (7/8) 0,25(31/32)
64
Resolvemos el sistema de ecuaciones
y1 0,0002428717
31
2 0 0 0 0 0
32
y2
0,0009563862
33 31
2 0 0 0 0
32 32
33 31
y3 0,0020961807
2
0 0 0 0
32 32
33 31
A= 0 0 2 0 0 y4 = 0,0035913882
32 32
33 31
0 0 0 2 0
y5 0,005349044
32 32
33 31
0 0 0 0 2
32 32 y6 0,0072598656
33
0 0 0 0 0 2
32 y7 0,2329824527
Obtenemos:
5
METODOS NUMERICOS
0 0
1/8
0,0168635839
1/4
0,0350658472
3/8
0,0554296875
x=
1/2
y=
0,0792711233
5/8
0,1083579557
3/4
0,14484429518
7/8 0,1911758734
1 0,25
Polinomio de Lagrange
CODIGO EN OCTAVE
Polinomio de Lagrange
function P=InterLagrange(x,y)
%P=InterLagrange([0 1/8 1/4 3/8 1/2 5/8 3/4 7/8 1],
6
METODOS NUMERICOS
Referencias
[1] Steven C. Chapra. Metodos Numericos para Ingenieros. McGraw Hill:2006.
[2] J. Mathews, D. Fink. Metodos Numericos con MATLAB. Prentice Hall:1999.