EXAMEN FINAL DE METODOS NUMERICOS 1. En la siguiente tabla, use diferenciación numérica para determinar:
x p 0.003
a)
f ' p si
b)
f '' p si
x f(x)
x p 0.213
0 1.0000
0.05 1.0513
0.10 1.1052
0.15 1.1618
0.20 1.2214
0.25 1.2840
Solución a): Para
X p 0.003
está en la parte inicial de la tabla entonces usamos N. Progresivo:
x
f(x)
0 0.05 0.10 0.15 0.20 0.25
1.0000 1.0513 1.1052 1.1618 1.2214 1.2840
513 539 566 596 626
26 27 30 30
2
1 3 0
Como
Según la fórmula de la derivada en función de P:
1
f p ( f 0 h y
P
X p X 0
f '0.003
h 1 0.05
(2P 1) 1)2 f0 2!
0.003 0 0.05
( 0.0513
f '0.003 1.00367
3
| 3 f 0 | 8
(3P 2 6P 2) 2) 3 f0 ) 3!
0.06
(2(0.06) 1)0.0026 2!
(3(0.06) 6(0.06) 2)0.0001 2
3!
)
Solución b): Como
X p 0.213
está al final de la tabla usamos N. Regresivo:
x
f(x)
0 0.05 0.10 0.15 0.20 0.25
1.0000 1.0513 1.1052 1.1618 1.2214 1.2840
513 539 566 596 626
26 27 30 30
2
3
1 3 0
Según la fórmula de la segunda derivada en función de P:
1
f p ( f 0 h
(2P 1)2 f0 2!
(3P 2 6P 2) 3 f0 ) 3!
Como
| 3 f 0 | 8
1 f p ( 2 f0 3 f0 ( P 1)) h y
P
X p X 0
f ''0.213
h 1
0.05 f ''0.213 0.06
0.213 0.25 0.05
0.74
(0.0030 0(P 1))
2. Halle la solución por el método de Gauss Seydel del siguiente sistema:
10 x1 2x2 0x3
1 con
3 x1 16 x2 2x 3 2 4 x1 3x2 20 x 3 3
101 y verificar suconvergencia
Solución Verificar Convergencia: |10|>|-2+0| -> 10>2 Bien |16|>|-3+2| -> 16>1 Bien |20|> |4-3| -> 20>1 Bien El sistema es diagonalmente dominante Siendo
x1 0 ; x2 1 ; x 3 2
y siendo
0,1
1ra Iteración
x 10 x 20
1 2( x 2 ) 10
1 2(1)
2 3 x1 2x 3 16
x 30
10
0,3
2 0,9 4 16
3 4( x1 ) 3( x 2 ) 20
0,06875
1,8 0,20625 20
0,07969
2ra Iteración
x 11 x 21 x 31
1 2( 0,06875) 10
0,08625
2 3(0,08625) 2(0,07969) 16 3 4(0,08625) 3(0,13121) 20
Comprobando valores calculados talque sean
0,13121 0,15243 0.1
| x11 x 10 | |0,08625 0,3| | 0,21375 | 0.1
Mal
| x21 x 20 | | 0,13121 (0,06875)| | 0,19996 | 0.1 | x31 x 30 | | 0,15243 0,07969| |0,07274 | 0.1 Dado que no se cumple la condición se continua con una iteración adicional: 3ra Iteración
Bien
Mal
x 12 x 22 x 32
1 2(0,13121) 10
0,12624
2 3(0,12624) 2(0,15243) 16 3 4(0,12624) 3(0,12962) 20
0,12962 0,1442
Comprobando valores calculados talque sean
0.1
| x12 x 11 | |0,126240 0,086250| |0,039990| 0.1
Bien
| x22 x 21 | |0,12962 0,13121| | 0,00159 | 0.1
Bien
| x32 x 31 | |0,14420 0,15243| | 0,00823 | 0.1
Bien
Dado que se cumple la condición el resultado es:
x1 0,12624 ; x2 0,12962 ; x 3 0,1442
2
3. Resolver la siguiente integral para
n4
de
sen( x 2 )
(1 e
senx
1
por el método de Romberg.
Solución Sabemos que
a 1
y
b 2 ;
Generamos la tabla K
nk hk nk 2k 1
1 1
2 2
3 4
4 8
1
0.5
0.25
0.125
y
hk
ba nk
Por Romberg tenemos que expresar:
21
nk
1
nk
)dx
R11 R21
R22
R31
R32
R33
R41
R42
R43
R44
Rk 1
Rk 2
Rk 3
Rk 4
Se sabe además que :
I.
f ( x )
sen( x 2 ) 1 e senx
Para la 1ra columna Para
k 1
R11
Para
1
[ f (1) f (2)]
2
1
[0,587998830 ( 0,539491482)] 0,024253674
2
k 2
R21
1
1
1 f (1 (i )(1)] 2
[0,024253674 (1)
2
i 1
R21 0,29634366
Para
k 3
R31
1 2
2
[0,29634366 (0.5)
i 1
1 f (1 ( i )(0.5)] 2
R31 0,89817183
Para
k 4
R41
1 2
4
[0,89817183 (0.25)
R41 1,19908592
i 1
1 f (1 (i )(0.25)] 2
II.
Para la 2da Columna utilizamos
Para
Rk 2
4 Rk 1 R( k 1)
, k 2,3,4
1
3
k 2
R22 0,387040322
Para
k 3
R32 1,098781220
Para
k 4
R42 1,299390617
III.
Para la 3ra Columna utilizamos
Para
Rk 3
16 Rk 2 R( k 1)
2
, k 3,4
3
, k 4
15
k 3
R33 1,146230613
Para
k 4
R43 1,312764576
IV.
Para la 4ta Columna utilizamos
Para
k 4
R44 1,315407973
Rk 4
64 Rk 3 R( k 1) 63
Resumen: Solución 0,024253674 0,296343660
0,387040322
0,898171830
1,098781220
1,146230613
1,199085920
1,299390617
1,312764576 1,315407973
2
sen( x 2 )
(1 e
senx
)dx 1,315407973
1
y '
4. Sea
2 xy e x
x x e
x
2
con
y (1) 0 ;
halle
y (1.15)
aplicando RK4
Solución Las ecuaciones de Runge-Kutta de cuarto orden (RK4) están dadas como:
h yi 1 yi ( k1 2k2 2k3 k 4 ) 6 donde:
k1 f ( xi , yi ) k2 f ( xi k3 f ( xi
h 2 h
, yi h
k 1 2 k 2
)
, yi h ) 2 2 k3 f ( xi h , yi hk3 ) Como
y(1) 0
x0 1 , y 0 0
Hallar
y(1.15) y( x1 ) x1 1.15 , y 1 ?
Por tanto:
h x1 x0 1.151 0.15 h 0.15
Según la formula:
h y1 y0 (k1 2k2 2k3 k 4 ) 6 0.15 (k1 2k2 2k3 k 4 ) y(1.15) y(1) 6 Se sabe que :
y ' f ( x , y )
2 xy e x
x 2 x e x
Luego:
k1 f ( x0 , y0 )
2(1)(0) e1 12 1 e1
k 1 0,731058579 k2 f ( x0
h 2
, y0 h
k 1 2
)
2(1,075)(0,054829393) e1,075 1,0752 1,075 e1,075
k 2 0,707924745 k3 f ( x0
h 2
, y0 h
k 2 2
)
2(1,075)(0,053094356) e1,075 1,0752 1,075 e1,075
k 3 0,707058308 k4 f ( x0 h , y0 hk3 )
2(1,15)(0,106058746) e1,15 1,152 1,15 e1,15
k 4 0,686685174
Calculo de
y1
y 1
y(1.15) y(1)
0.15 6
(k1 2k2 2k3 k 4 )
y(1.15) 0 0.025(k1 2k2 2k3 k 4 ) y (1.15)
0.025(0,731058579
2(0,707924745) 2(0,707058308) 0,686685174)
y (1.15)
0,106192746
con
x y iv x 2 y ''' x y '' x 2 y ' x y x sen(x ) y(0) y ''(0) 1 y y '(0) y '''(0) 0
(a)
Expresar como un sistema EDO de primer orden
(b)
Según (a), hallar
5. Sea
y (0.2)
por Euler
Solución(a)
yiv x y ''' y '' x y ' y sen( x ) y1
y
y '1
y ' y 2
y2
y'
y '2
y '' y 3
y3
y ''
y '3
y ''' y 4
y4
y '''
y '
y '4
y '1
y 2
y '2
y 3
y '3
y '4
y iv x y 4 y 3 x y 2 y 1 sen(x )
y 4 x y4 y3 x y2 y1 sen( x )
De las condiciones iniciales
y(0) 1
y 1 (0) 1
y '(0) 0
y 2 (0) 0
y ''(0) 1
y 3 (0) 1
y '''(0) 0
y (0 )
y 4 (0) 0
y (0 )
y 1 (0)
1
y '(0 )
y 2 (0)
0
y ''(0)
y 3 (0)
1
y '''(0 )
y 4 (0)
0
Solución(b)
yi 1 yi h y 'i
Para EULER
, i 0,1,2,...
x 1 0.2 h x1 x 0 x 0 0 h 0.2 Para
y 1
i 0
y
y1 y0 0.2 y '0
y1 (0)
y 2 (0)
y2 (0)
y 3 (0)
y3 (0)
0.2
y 4 (0) 0 y4 (0) y3 (0) 0 y 2 (0) y1 (0) sen(0)
y4 (0) 1
y 1
0 1
0
0.2
0
1 1 0
0
y 1
1
1
0
1
0
0
1
0
0.2
1 0
0.2
0
2
1 0
0
0.4
1
0.2 1
0.4