Documente Academic
Documente Profesional
Documente Cultură
EJERCICIO 7
Aplicar el mtodo de Taylor de orden dos a la ecuacin y = Cos(xy), con la condicin
inicial: y(0) = 1. Utilizar h = 0.5
La aproximacin de segundo orden dada por la serie de Taylor es:
y ''i 2
'
y i+1= yi + y h+ h
i donde h=xi +1x i=0,5
2!
2
f ' ( xi , yi ) h
y i+1= yi + f ( xi , y i ) h+ (I)
2!
1 2
y i+1= yi +cos ( xi y i ) h sen ( x i y i ) [ xi cos ( x i y i ) + y i ] h
2
y ( x0 ) = y ( 0 )=1
1,706865
1,706865
1()
1,706865
1()
y ( x3 ) = y (1,5 )=1,706865+0,5 cos
1,5
()
( 1,444453 )
y ( x 4 )= y ( 2 )=1,444453+ 0,5cos
1,101490
EJERCICIO 8
Plantee y solucione paso a paso un ejercicio por el Mtodo de Runge-Kutta de cuarto
orden.
Obtener la aproximacin y (0,8) a la solucin del siguiente problema de valor inicial, con
h=0.2
' 2
y = yx +1
y (0)' =0.52
Solucin
Para la solucin de este problema se debe realizar iteraciones paso a paso para
determinar el siguiente valor de y i por lo que Runge-Kutta debemos aplicar:
1
y i+1= yi + ( k 1 +2 k 2 +2 k 3 +k 4 ) h
6
Dnde:
K 1=f ( xi , y i )
1 1
(
K 2=f x i + h , y i + K 1 h
2 2 )
1 1
(
K 3=f x i + h , yi + K 2 h
2 2 )
K 4 =f ( x i +h , y i+ K 3 h )
Las anteriores funciones podemos reducirla de las siguientes maneras para calcularlas de
una manera ms fcil en cada iteracin:
( k 1+2 k 2 +2 k 3 + k 4 ) h
y i+1= yi +
6
Dnde:
K 1=f ( xi , y i )
K h
( h
K 2=f x i + , y i+ 1
2 2 )
K h
( h
K 3=f x i + , y i+ 2
2 2 )
K 4 =f ( x i +h , y i+ K 3 h )
K 1=f ( x0 , y 0 )
K 1=f ( 0 ,0.25 )
K 1= y x2 +1
K 1=0.2502 +1
K 1=0.25+1
K 1=1.25
K h
( h
K 2=f x 0 + , y 0 + 1
2 2 )
( 1.25 ) (0.2)
(
K 2=f 0+
0.2
2
,0.25+
2 )
0.25
(
K 2=f 0.1,0 .25+
2 )
K 2=f ( 0.1,0.25+ 0.125 )
K 2= y x2 +1
K 2=0.3750.12 +1
K 2=0.3750.01+1
K 2=1.365
K h
( h
K 3=f x 0 + , y 0 + 2
2 2 )
(
K 3=f 0+
0.2
2
,0.25+
(1.365)(0.2)
2 )
0.273
(
K 3=f 0.1 , 0.25+
2 )
K 3=f ( 0.1, 0.25+ 0.1365 )
K 3= y x2 +1
K 3=0.38650.12 +1
K 3=0.38650.01+1
K 3=1.3765
K 4 =f ( x 0 +h , y 0 + K 3 h )
K 4 =f ( 0.2 , 0.25+0.2753 )
K 4 =f ( 0.2 , 0.5253 )
K 4 = yx 2 +1
K 4 =0.52530.22+1
K 4 =0.52530.04+1
K 4 =1.4853
X Y K1 K2 K3 K4
0 0.25 1.25 1.365 1.3765 1.4853
Para determinar la siguiente iteracin debemos hallar el siguiente valor de x1 y de
y 1 , primero resolveremos el valor para x:
x 1=x 0+ h
x 1=0+0.2
x 1=0.2
( k 1+ 2k 2+ 2k 3+ k 4 ) h
y 0+1= y 0+
6
( 1.25+2.73+2.753+1.4853 ) 0.2
y 1=0.25+
6
( 8.2183 ) 0.2
y 1=0.25+
6
1.64366
y 1=0.25+
6
y 1=0.25+0.27394
y 1=0.52394
K 1=0.523940.22 +1=0.523940.04+1=1.48394
( 1. 48394 ) (0.2)
(
K 2=f 0.2+
0.2
2
, 0. 52394+
2 ) (
=f 0.2+ 0.1 ,0. 52394+
0.29678
2 )
K 2=f ( 0.3 ,0. 52394+ 0.14839 )=f ( 0.3 , 0.67233 )
(
K 3=f 0.2+
0.2
2
, 0. 52394+
(1. 58233)(0.2)
2 ) (
=f 0.2+0.1 , 0.52394 +
0.31646
2 )
K 3=f ( 0.3 ,0. 52394+ 0.15823 )=f ( 0.3 ,0.68217 )
K 4 =f ( 0.4 ,0.84237 )
2
K 4 =0. 842370.4 +1=0. 842370.16+1=1.68237
X Y K1 K2 K3 K4
0 0.25 1.25 1.365 1.3765 1.4853
0.2 0.52394 1.48394 1.58233 1.59217 1.68237
y 2=0. 52394+0.31717=0.84111
K 1=0.841110.42 +1=0.841110.16+1=1.68111
( 1.68111 ) (0.2)
(
K 2=f 0.4 +
0.2
2
, 0.84111+
2 ) (
=f 0.4+0.1 , 0. 84111+
0.33622
2 )
K 2=f ( 0.5 ,0. 84111+0.16811 ) =f ( 0.5 , 1.00922 )
2
K 2=1. 009220.5 +1=1.009220.25+1=1.75922
(
K 3=f 0.4 +
0.2
2
, 0. 84111+
(1. 75922)( 0.2)
2 ) (
=f 0.4+0.1 , 0. 84111+
0.35184
2 )
K 3=f ( 0.5 ,0. 84111+0.17592 )=f ( 0.5 ,1.01703 )
K 4 =f ( 0.6 , 1.19451 )
y 3=0. 84111+0.35227=1.19338
K 1=1.193380.62 +1=1.193380.36+1=1.83338
K 4 =f ( 0.8 , 1.57179 )
X Y K1 K2 K3 K4
0 0.25 1.25 1.365 1.3765 1.4853
0.2 0.52394 1.48394 1.58233 1.59217 1.68237
0.4 0.84111 1.68111 1.75922 1.76703 1.83451
0.6 1.19338 1.83338 1.88671 1.89205 1.93179
K 1=1.57080.82 +1=1.57080.64+1=1.9308
2
K 2=1. 763880.9 +1=1.763880.81+1=1.95388
(
K 3=f 0.8+
0.2
2
,1. 5708+
(1. 95388)(0.2)
2 ) (
=f 0.8+0.1 , 1.5708+
0.39077
2 )
K 3=f ( 0.9 ,1. 5708+0.19538 )=f ( 0.9 , 1.76618 )
K 4 =f ( 1 ,1.96203 )
X Y K1 K2 K3 K4
0 0.25 1.25 1.365 1.3765 1.4853
0.2 0.52394 1.48394 1.58233 1.59217 1.68237
0.4 0.84111 1.68111 1.75922 1.76703 1.83451
0.6 1.19338 1.83338 1.88671 1.89205 1.93179
0.8 1.5708 1.9308 1.95388 1.95618 1.96203