EJERCICIOS
EJERCICIO 7
Aplicar el método de Taylor Taylor de orden dos a la ecuación y´ = Cos(xy), con la condición inicial: y(0) = 1. tili!ar " = 0.# $a aproximación de se%undo orden dada por la serie de Taylor es: ''
y i 2 y i+1= yi + y h + h donde 2!
h = xi + 1− x i=0,5
' i
Con
f ( ( x , y ) =cos ( xy ) se tiene &ue: f ' ( x i , y i ) h
2
y i+ 1= yi + f ( ( xi , y i ) h +
(')
2!
f ' ( ( x x , y ) =−sen ( xy ) [ x x y + y ] '
¿− sen ( xy ) [ x cos ( xy ) + y ] 1
ustituyendo en (')
[
]
2
y i+1= yi + cos ( xi y i ) h− sen ( x x i y i ) xi xi cos ( x x i y i ) + y i h 2
Camiando " por 0,# se tiene:
[
y i+ 1= yi + 0,5cos ( xi y i )− 0,125 sen ( x x i y i ) xi xi cos ( x x i y i ) + yi
Con
]
h =0,5 y la condición inicial y ( 0 )=1 pueden aproximarse *arios *alores
y ( x0 ) = y ( 0 )=1 y ( x1 ) = y ( 0,5 )=1 + 0,5 cos ( 0 )−0,125 sen ( 0 ) [ 0cos ( 0 ) + 1 ] =1,5
0,5
(¿) ( 1,5 ) ( 0,5 ) cos ( ¿+ 1,5 ] y ( x2 ) = y (1 ) =1,5 + 0,5 cos ( ( 0,5 ) ( 1,5 ) ) −0,125 sen ( 0,5 ) ( 1,5 ) ¿ ¿ 1,706865 1,706865 1 (¿)
¿
1,706865 1 (¿)
¿ ¿
y ( x3 ) = y (1,5 )=1,706865 + 0,5cos ¿ 1,5
(¿) ¿
( 1,444453 ) ¿ y ( x 4 )= y ( 2 )=1,444453 + 0,5cos ¿ ¿ 1,101490
EJERCICIO 8
+lantee y solucione paso a paso un eercicio por el -étodo de un%e/utta de cuarto orden. tener la aproximación y (0,2) a la solución del si%uiente prolema de *alor inicial, con
h =0.2 '
2
y = y − x + 1 '
2
y ( 0 ) =0.5 Solución
+ara la solución de este prolema se dee reali!ar iteraciones paso a paso para determinar el si%uiente *alor de
y i por lo &ue un%e/utta deemos aplicar:
y i+ 1= yi +
1 6
(k + 2 k + 2 k +k ) h 1
2
3
4
3ónde:
K 1= f ( xi , y i )
(
1
1
2
2
(
1
1
2
2
K 2= f x i + h , y i + K 1 h
K 3= f x i + h , yi + K 2 h
) )
K 4 =f ( x i + h , y i+ K 3 h ) $as anteriores 4unciones podemos reducirla de las si%uientes maneras para calcularlas de una manera m5s 45cil en cada iteración:
y i+ 1= yi +
( k + 2 k +2 k + k ) h 1
2
3
4
6
3ónde:
K 1= f ( xi , y i )
(
2
(
2
K 1 h h K 2= f x i + , y i+ 2
K 2 h h K 3= f x i + , y i+ 2
) )
K 4 =f ( x i + h , y i+ K 3 h ) A"ora de4iniremos los *alores para la primera iteración a reali!ar: 2
i=0 , x i=0 , y i=0.5 = 0.25 ,h =0.2
6ntonces comencemos por la primera iteración:
K 1= f ( x0 , y 0 )
K 1= f ( 0 , 0.25 ) empla!amos los *alores en la 4unción de la deri*ada para otener el *alor: 2
K 1= y − x + 1 2
K 1=0.25 −0 + 1 K 1=0.25 + 1 K 1=1.25 A"ora continuaremos por cada uno de los *alores:
(
K 1 h h K 2= f x 0 + , y 0 +
(
2
K 2= f 0 +
0.2 2
2
, 0.25 +
(
K 2= f 0.1,0 .25+
( 1.25 ) (0.2 )
0.25 2
) 2
)
)
K 2= f ( 0.1,0.25 + 0.125 ) K 2= f ( 0.1 , 0.375 ) 2
K 2= y − x + 1 2
K 2=0.375 −0.1 + 1 K 2=0.375 −0.01 + 1 K 2=1.365 Continuamos con el si%uiente *alor:
(
K 2 h h K 3= f x 0 + , y 0 + 2
2
)
(
K 3= f 0 +
0.2 2
(1.365)( 0.2)
, 0.25 +
(
K 3= f 0.1 , 0.25 +
2
0.273 2
)
)
K 3= f ( 0.1 , 0.25 + 0.1365 ) K 3= f ( 0.1 , 0.3865 ) 2
K 3= y − x + 1 2
K 3=0.3865 −0.1 +1 K 3=0.3865 −0.01 + 1 K 3=1.3765 7 por 8ltimo con el 8ltimo *alor:
K 4 =f ( x 0 + h , y 0 + K 3 h ) K 4 =f ( 0 + 0.2 , 0.25 + ( 1.3765 ) ( 0.2 ) ) K 4 =f ( 0.2 , 0.25 + 0.2753 ) K 4 =f ( 0.2 , 0.5253 ) 2
K 4 = y − x + 1 2
K 4 =0.5253 − 0.2 +1 K 4 =0.5253− 0.04 + 1 K 4 =1.4853 3e esta 4orma "emos lo%rado otener los *alores de la primera iteración: X
0
K 1
Y
0.9#
1.9#
K 2 1.;#
K 3 1.<;#
K 4 1.2#
+ara determinar la si%uiente iteración deemos "allar el si%uiente *alor de
x 1
y de
y 1 , primero resol*eremos el *alor para x: x 1= x 0+ h x 1=0 + 0.2 x 1=0.2 $ue%o el *alor para y:
y 0+1= y 0+
y 1=0.25 +
y 1=0.25 +
y 1=0.25 +
y 1=0.25 +
( k + 2 k + 2 k + k ) h 1
2
3
4
6
( 1.25 + 2 (1.365 )+ 2 (1.3765 )+ 1.4853 ) 0.2 6
( 1.25 + 2.73 + 2.753 + 1.4853 ) 0.2 6
( 8.2183 ) 0.2 6
1.64366 6
y 1=0.25 + 0.27394 y 1=0.52394 x 1 y de
Como tenemos ya los *alores de
y 1 , procedemos a reali!ar la se%unda
iteración.
K 1= f ( 0.2 , 0.52394 ) 2
K 1=0.52394 −0.2 + 1= 0.52394 − 0.04 + 1=1.48394
(
K 2= f 0.2 +
0.2 2
, 0. 52394 +
( 1. 48394 ) ( 0.2) 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 ) 2
K 2=0. 67233− 0.3 + 1=0. 67233− 0.09+ 1=1.58233
(
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 ) 2
K 3=0. 68217 −0.3 + 1=0. 68217 −0.09 + 1=1.59217
K 4 =f ( 0.2 + 0.2 , 0. 52394 +( 1. 59217 ) ( 0.2 ) ) = f ( 0.4 , 0. 52394+ 0.31843 ) K 4 =f ( 0.4 , 0.84237 ) 2
K 4 =0. 84237−0.4 + 1=0. 84237 −0.16 + 1= 1.68237 3e esta 4orma "emos lo%rado otener los *alores de la se%unda iteración: X
0 0.9
Y
0.9# 0.#9>
K 1
K 2
K 3
1.9# 1.2>
1.;# 1.#29
1.<;# 1.#>91<
K 4 1.2# 1.;29<
+ara determinar la si%uiente iteración deemos "allar el si%uiente *alor de de
y 2 , primero resol*eremos el *alor para x: x 2= x 1+ h=0.2 + 0.2
¿ 0.4
$ue%o el *alor para y:
y 2=0.52394 +
y 2=0.52394 +
( 1.48394+ 2 ( 1.58233)+ 2 (1.59217)+ 1.68237) 0.2 6
( 1.48394+ 3.16466 + 3.18434 + 1.68237) 0.2 6
x 2 y
y 2=0. 52394 +
( 9.51531 ) 0.2 6
=0.52394 +
1.90306 6
y 2=0. 52394 + 0.31717 =0.84111 x 2 y d e
Como tenemos ya los *alores de
y 2 , procedemos a reali!ar la tercera
iteración.
K 1= f ( 0.4 , 0.84111 ) 2
K 1=0.84111− 0.4 + 1=0.84111− 0.16 + 1=1.68111
(
K 2= f 0.4 +
0.2 2
, 0.84111 +
( 1.68111 ) (0.2 ) 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. 00922−0.5 + 1 =1.00922 −0.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 ) 2
K 3=1.01703− 0.5 + 1=1. 01703−0.25 + 1 =1.76703
K 4 =f ( 0.4 + 0.2 , 0.84111 + ( 1. 76703 ) ( 0.2 ) ) = f ( 0.6 , 0. 84111+ 0.35340 ) K 4 =f ( 0.6 , 1.19451 ) 2
K 4 =1.19451− 0.6 + 1=1. 19451−0.36 + 1 =1.83451
3e esta 4orma "emos lo%rado otener los *alores de la tercera iteración:
X
K 1
K 2
K 3
1.9# 1.2> 1.;2111
1.;# 1.#29 1.<#>99
1.<;# 1.#>91< 1.<;<0
Y
0 0.9 0.
0.9# 0.#9> 0.2111
K 4 1.2# 1.;29< 1.2#1
+ara determinar la si%uiente iteración deemos "allar el si%uiente *alor de
x 3
y de
y 3 , primero resol*eremos el *alor para x: x 3= x 2+ h=0.4 + 0.2
¿ 0.6
$ue%o el *alor para y:
y 3=0. 84111 +
y 3=0. 84111 +
y 3=0. 84111+
( 1. 68111 + 2 (1.75922 )+ 2 (1. 76703)+ 1.83451 ) 0.2 6
( 1. 68111+ 3.51844 +3.53406 + 1. 83451 ) 0.2 6
( 10.56812 ) 0.2 6
=0. 84111+
2.11362 6
y 3=0. 84111 + 0.35227 = 1.19338 x 3 y de
Como tenemos ya los *alores de
y 3 , procedemos a reali!ar la cuarta
iteración.
K 1= f ( 0.6 , 1. 19338 ) 2
K 1=1.19338 −0.6 + 1=1.19338 −0.36 + 1=1.83338
(
K 2= f 0.6 +
0.2 2
, 1. 19338 +
(1. 83338 ) ( 0.2) 2
) ( =f
0.6 + 0.1 , 1.19338 +
K 2= f ( 0.7 , 1. 19338 + 0.18333 ) =f ( 0.7 , 1.37671 ) 2
K 2=1.37671−0.7 + 1 =1.37671 −0.49 + 1=1.88671
0.36667 2
)
(
K 3= f 0.6 +
0.2 2
, 1. 19338 +
( 1. 88671)( 0.2) 2
)= (
f 0.6 + 0.1 , 1.19338 +
0.37734 2
)
K 3= f ( 0.7 , 1. 19338 + 0.18867 )=f ( 0.7,1.38205 ) 2
K 3=1. 38205− 0.7 + 1=1. 38205−0.49 + 1 =1.89205
K 4 =f ( 0.6 + 0.2 , 1.19338 + ( 1.89205 ) ( 0.2 ) ) = f ( 0.8 , 1.19338 + 0.37841 ) K 4 =f ( 0.8 , 1.57179 ) 2
K 4 =1.57179 −0.8 + 1=1. 57179−0.64 +1=1.93179
3e esta 4orma "emos lo%rado otener los *alores de la cuarta iteración: X
0 0.9 0. 0.;
Y
0.9# 0.#9> 0.2111 1.1>2
K 1
K 2
K 3
1.9# 1.2> 1.;2111 1.22
1.;# 1.#29 1.<#>99 1.22;<1
1.<;# 1.#>91< 1.<;<0 1.2>90#
K 4 1.2# 1.;29< 1.2#1 1.>1<>
+ara determinar la si%uiente iteración deemos "allar el si%uiente *alor de
y 4 , primero resol*eremos el *alor para x: x 4= x 3 + h =0.6 + 0.2
¿ 0.8
$ue%o el *alor para y:
y 4 =1.19338 +
y 4 =1.19338 +
y 4 =1.19338 +
( 1. 83338 +2 (1. 88671)+ 2 (1. 89205 )+ 1.93179 ) 0.2 6
( 1. 83338+ 3.77342 + 3.7841 + 1. 93179 ) 0.2 6
( 11.32269 ) 0.2 6
=0. 84111+
2.26453 6
x 4
y de
y 4 =1.19338 + 0.37742 =1.5708 Como tenemos ya los *alores de
x 4 y de
y 4 , procedemos a reali!ar la 8ltima
K 1 , K 2 , K 3 y K 4 .
iteración y otener los *alores de
K 1= f ( 0.8 , 1. 5708 ) 2
K 1=1.5708 −0.8 + 1=1.5708 −0.64 + 1 =1.9308
(
K 2= f 0.8 +
0.2 2
, 1.5708 +
(1.9308 ) ( 0.2) 2
) ( =f
0.8 + 0.1 , 1.5708 +
0.38616 2
)
K 2= f ( 0.9 , 1.5708 + 0.19308 )= f ( 0.9 , 1.76388 ) 2
K 2=1. 76388−0.9 + 1 =1.76388 −0.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 ) 2
K 3=1. 76618−0.9 + 1 =1.76618 −0.81 + 1=1.95618
K 4 =f ( 0.8 + 0.2 , 1.5708 + ( 1. 95618 ) ( 0.2 ) ) = f ( 1,1.5708 + 0.39123 ) K 4 =f ( 1 , 1.96203 ) 2
K 4 =1. 96203−1 +1=1.96203
?alores de la solución del eercicio: X
0 0.9
Y
0.9# 0.#9>
K 1
K 2
K 3
1.9# 1.2>
1.;# 1.#29
1.<;# 1.#>91<
K 4 1.2# 1.;29<
0. 0.; 0.2
0.2111 1.1>2 1.#<02
1.;2111 1.22 1.>02
1.<#>99 1.22;<1 1.>#22
1.<;<0 1.2>90# 1.>#;12
1.2#1 1.>1<> 1.>;90