Beruflich Dokumente
Kultur Dokumente
Introduccin
Mtodo de Euler - Obtencin de la Frmula
Mtodo de Euler - Ejemplo
Mtodo de Runge-Kutta de Orden 2 - Ejemplo
Mtodo de Runge-Kutta de Orden 4 - Ejemplo
Algoritmos de Runge-Kutta
Sistemas de Ecuaciones Diferenciales Ordinarias
Ecuaciones Diferenciales de Orden Superior
Ecuaciones Diferenciales
Ordinarias
Introduccin
Ejemplos
Ejemplo 2
2x
dy
y
Considera la ecuacin diferencial dx
=
. Para cualquier
x+1
1
k R, la funcin y (x) =
es solucin de la ecuacin.
ln (x + 1) + k
2
Ejemplo 1
2x
+ C2 e x + 2
y (0) = 0
y 0 (0) = 0
2x
4ex + 2
Ejemplo 2
dy
y
1
Ecuacin: dx
=
.
Solucin:
y (x) =
.
x+1
ln (x + 1) + k
Condicin inicial: y (0) = 2. Solucin: y = ln (x +11) .
2
1
2
Ecuaciones Diferenciales
Ordinarias
Introduccin
Fin
Ecuaciones Diferenciales
Ordinarias
Mtodo de Euler - Obtencin de la
Frmula
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
Frmula para y1
Problema
Pendiente de la solucin: f (x , y )
Pendiente de la recta: y h y
Igualando: f (x, y) = y h y
Despejando: y = y + hf (x , y )
0
dy
= f (x, y), y (x0 ) = y0 .
dx
dy
Encontrar una aproximacin de y = y (x) tal que dx
= f (x, y),
y (x ) = y .
0
yi+1 = yi + hf (xi , yi )
Ecuaciones Diferenciales
Ordinarias
Mtodo de Euler - Obtencin de la
Frmula
Fin
Ecuaciones Diferenciales
Ordinarias
Mtodo de Euler - Ejemplo
y
dy
=
,
dx
2x + 1
Solucin Analtica
y (x) =
ln (2x + 1)
+2
4
2
y (0) = 4.
y
dy
=
,
dx
2x + 1
yy
Problema
Solucin Numrica
=0
y (0) = 4.
. Entonces
=4
x1 = x0 + h = 0 + 0.5 = 0.5
y1 = y0 + hf (x0 , y0 ) = 4 + 0.5f (0, 4) = 4 + 0.5 2 = 5.0
x2 = x1 + h = 0.5 + 0.5 = 1.0
y2 = y1 + hf (x1 , y1 ) = 5 + 0.5f (0.5, 5.0) = 5 + 0.5 1.118034
= 5.559017
x3 = x2 + h = 1.0 + 0.5 = 1.5
y3 = y2 + hf (x2 , y2 ) = 5.559017 + 0.5f (1.0, 5.559017)
= 5.559017 + 0.5 0.7859189 = 5.9519765
Problema
y
dy
=
,
dx
2x + 1
Solucin Numrica
0.00
0.25
0.50
0.75
1.00
1.25
1.50
1.75
2.00
yt
4.000
4.416
4.723
4.969
5.174
5.351
5.506
5.645
5.771
h = 0.5
ya
t
4.000
5.000
5.559
5.952
6.257
- 5.9 %
- 7.4 %
- 8.1 %
- 8.4 %
h = 0.25
ya
t
4.000
4.500
4.854
5.129
5.355
5.548
5.717
5.866
6.000
- 1.9 %
- 2.8 %
- 3.2 %
- 3.5 %
- 3.7 %
- 3.8 %
- 3.9 %
- 4.0 %
y (0) = 4.
Problema
y
dy
=
,
dx
2x + 1
y (0) = 4.
Problema
y
dy
=
,
dx
2x + 1
y (0) = 4.
Ecuaciones Diferenciales
Ordinarias
Mtodo de Euler - Ejemplo
Fin
Ecuaciones Diferenciales
Ordinarias
Mtodo de Runge-Kutta de Orden 2Ejemplo
Frmulas
Problema General
dy
= f (x, y) ,
dx
y (x0 ) = y0 .
Frmulas
yi+1 = yi + (a1 k1 + a2 k2 ) h
donde
Tambin,
k1 = f (xi , yi )
k2 = f (xi + p1 h, y1 + q11 k1 h)
a1 = 1 a2
1
p1 =
2a2
1
q11 =
2a2
Casos Especiales
, donde k = f (x , y ) y
. Tambin, a = 1 a , p
Frmulas
yi+1 = yi + (a1 k1 + a2 k2 ) h
k2 = f (xi + p1 h, y1 + q11 k1 h)
1
q11 =
2a2
1. Heun, a =
2. Ralston, a =
3. Punto medio, a
1
2
Ralston,
a2 =
2
3
2
=1
2
3
yi+1 = yi +
donde
1
2
k1 + k2 h
3
3
k1 = f (xi , yi )
3
3
k2 = f xi + h, yi + k1 h
4
4
1
2a2
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
Solucin Analtica
y (x) = 5 exp
y (0) = 4.
1
2
sen x + 2x 1
2
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
Ralston,
a2 =
2
3
yi+1 = yi +
donde
y
y (0) = 4.
1
2
k1 + k2 h
3
3
k1 = f (xi , yi )
3
3
k2 = f xi + h, yi + k1 h
4
4
Usaremos h = 0.5.
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Primer Paso
k2 = f
k1 = f (0, 4) = 5
3
3
0 + 0.5, 4 + 5 0.5 = f (0.375, 5.875) = 5.945
4
4
y1 = 4 +
x1 = 0 + 0.5 = 0.5
2
1
5 + 5.945 0.5 = 6.815
3
3
t =
7.036 6.815
= 3.1%
7.036
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
Segundo Paso
k2 = f 0.5 +
y (0) = 4.
0.5, 6.815 +
3
4
3.696 0.5 = f (0.875, 8.201)
= 13.98
2
1
3.696 + (13.98) 0.5 = 2.771
3
3
t =
4.366 2.771
= 57%
2.771
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Ecuaciones Diferenciales
Ordinarias
Mtodo de Runge-Kutta de Orden 2 Ejemplo
Fin
Ecuaciones Diferenciales
Ordinarias
Mtodo de Runge-Kutta de Orden 4 Ejemplo
Frmulas
Problema General
dy
= f (x, y) ,
dx
y (x0 ) = y0 .
Frmulas
yi+1 = yi +
donde
1
(k1 + 2k2 + 2k3 + k4 ) h
6
k1 = f (xi , yi )
1
1
k2 = f xi + h, yi + k1 h
2
2
1
1
k3 = f xi + h, yi + k2 h
2
2
k4 = f (xi + h, yi + k3 h)
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
Solucin Analtica
y (x) = 5 exp
y (0) = 4.
1
2
sen x + 2x 1
2
Solucin Numrica
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
Primer Paso
y (0) = 4.
1
1
k1 = f (0, 4) = 5, k2 = f 0 + 0.5, 4 + 5 0.5 = 6.609
2
2
1
1
k3 = f 0 + 0.5, 4 + 6.609 0.5 = 7.034
2
2
k4 = f (0 + 0.5, 4 + 7.034 0.5) = 4.028
x1 = 0 + 0.5 = 0.5
y1 = 4 +
1
(5 + 2 6.609 + 2 7.034 + 4.028) 0.5 = 7.026
6
7.036 7.026
t =
= 0.1%
7.036
Solucin Numrica
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Segundo Paso
k1 = f (.5, 7.026) = 3.796, k2 = f .5 + 12 .5, 7.026 + 12 3.796 .5 = 7.415
1
1
k3 = f 0.5 + 0.5, 7.026 + (7.415) 0.5 = 5.1
2
2
k4 = f (0.5 + 0.5, 7.026 + (5.1) 0.5) = 10.84
1
(3.796 + 2 (7.415) + 2 (5.1) + (10.84)) 0.5
6
= 4.353
t =
4.366 4.353
= 0.3%
4.366
Resolver
el problema de valor inicial
dy
Problema
dx
= (y + 1) (x + 1) cos x2 + 2x ,
y (0) = 4.
Ecuaciones Diferenciales
Ordinarias
Mtodo de Runge-Kutta de Orden 4 Ejemplo
Fin
Ecuaciones Diferenciales
Ordinarias
Algoritmos de Runge-Kutta
Mtodo de Euler
Mtodo de Euler
Mtodo de Euler
t1 t0
Mtodo de Euler
t1 t0
x1 x0
Mtodo de Euler
t1 t0
x1 x0
i
tf t0
h
Mtodo de Euler
t1 t0
x1 x0
i
1
ti+1 ti + h
tf t0
h
Mtodo de Euler
t1 t0
x1 x0
tf t0
i
1
h
ti+1 ti + h
xi+1 xi + hf (ti , xi )
Mtodo de Euler
t1 t0
x1 x0
tf t0
i
1
h
ti+1 ti + h
xi+1 xi + hf (ti , xi )
t1 t0
x1 x0
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
tf t0
h
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
Fin Para
tf t0
h
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
tf t0
h
k1 f (ti , xi )
k2 f (ti + p1 h, xi + q11 k1 h)
Fin Para
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
tf t0
h
k1 f (ti , xi )
k2 f (ti + p1 h, xi + q11 k1 h)
ti+1 ti + h
Fin Para
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
tf t0
h
k1 f (ti , xi )
k2 f (ti + p1 h, xi + q11 k1 h)
ti+1 ti + h
xi+1 xi + h(a1 k1 + a2 k2 )
Fin Para
t1 t0
x1 x0
a1 1 a2
p1 2a12
q11 2a12
tf t0
h
k1 f (ti , xi )
k2 f (ti + p1 h, xi + q11 k1 h)
ti+1 ti + h
xi+1 xi + h(a1 k1 + a2 k2 )
Fin Para
Regresar t , x
i
Ecuaciones Diferenciales
Ordinarias
Algoritmos de Runge-Kutta
Fin
Ecuaciones Diferenciales
Ordinarias
Sistemas de Ecuaciones Diferenciales
Ordinarias
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Problema
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Problema
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Solucin Numrica
Mtodo de Euler
Problema
Usaremos
dx
= 3x + y,
x (0) = 5
dt
dy
= 4x 3y,
y (0) = 6
dt
5
3x(1) + x(2)
h = 0.1 x0 =
F (t, x) =
6
4x(1) 3x(2)
Primer Paso
t1 = t0 + h = 0 + 0.1 = 0.1
5
9
4.1
x1 = x0 + hF (t, x0 ) =
+ 0.1
=
6
38
2.2
4.072
x (0.1) =
2.885
Solucin Numrica
Mtodo de Euler
Problema
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Segundo Paso
Solucin Numrica
Mtodo de Euler
Problema
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Solucin Numrica
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
Problema
Usaremos a
Primer Paso
2
3
x (0) = 5
y (0) = 6
(mtodo de Ralston)
9
k1 = F (t0 , x0 ) =
38
3
3
9.825
4.325
=
k2 = F t0 + h, x0 + hk1 = F 0.075,
3.15
26.75
4
4
1 9
2 9.825
5
4.045
x1 =
+ 0.1
+
=
6
2.95
3 38
3 26.75
4.072
x (0.1) =
2.885
Solucin Numrica
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
Segundo Paso
x (0) = 5
y (0) = 6
4.045
9.185
0.1,
=
2.95
25.03
3
3
8.966
3.356
k2 = F t0 + h, x0 + hk1 = F 0.175,
=
1.073
16.64
4
4
1 9.185
2 8.966
4.045
3.139
x1 =
+ 0.1
+
=
2.95
1.006
3 25.03
3 16.64
3.169
x (0.2) =
0.896
k1 = F (t1 , x1 ) = F
Solucin Numrica
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
dx
= 3x + y,
dt
dy
= 4x 3y,
dt
x (0) = 5
y (0) = 6
Ecuaciones Diferenciales
Ordinarias
Sistemas de Ecuaciones Diferenciales
Ordinarias
Fin
Ecuaciones Diferenciales
Ordinarias
Ecuaciones Diferenciales Ordinarias de
Orden Superior
00
Solucin
+ x0 + x = 2et x (0) = 0
Reduccin de Orden
00
x0 = y
0
x (0) = 0
t
y = 2e y x
y (0) = 1
Denamos la funcin
x(2)
F (t, x) =
t
2e x(2) x(1)
y la condicin inicial x
0
1
Solucin
00
Mtodo de Euler
+ x0 + x = 2et x (0) = 0
Ecuaciones Diferenciales
Ordinarias
Ecuaciones Diferenciales Ordinarias de
Orden Superior
Fin
Bibliografa