Está en la página 1de 3

UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS (Universidad del Per, , Decana de Amrica )

FACULTAD DE CIENCIAS MATEMATICAS CURSO: Tcnicas de Modelage PROFESORA: Martha Timoteo Snchez LABORATORIO N 5 Aproximacin de la solucin del problema de valor inicial y' ( t ) = f ( t, y ( t ) ) , a t b y ( a) = En N + 1 nmeros igualmente espaciados en el intervalo [ a, b] . t0 = a, t1 = t0 + h, t2 = t1 + h = t0 + h + h = t0 + 2h M ti = ti 1 + h = t0 + ih M tN = b ba . N Tenemos w0 = y ( t0 ) = y ( a ) = y wi y ( ti ) Observamos, h = SEMESTRE 2012-II

METODO DE EULER
ALGORITMO DE EULER Entrada: puntos extremos a , b; entero N; condicin inicial . Salida: Aproximacin w de y en los puntos ( N+1 ) valores de t. Paso 1 Tomar h = ( b a ) / N ; t = a; w=; SALIDA ( t, w) . Paso 2 Para i = 1,2,..., N seguir los pasos 3-4 Paso 3 Tomar w = w + hf ( t , w ) //w(i)=w(i-1)+h*f(t(i-1),w(i-1)) t = a + ih ; Paso 4 SALIDA ( t, w) . Paso 5 Parar.

METODO DE RUNGE KUTTA


ALGORITMO DE RUNGE KUTTA Entrada: puntos extremos a , b; entero N; condicin inicial . Salida: Aproximacin w de y en los puntos ( N+1 ) valores de t. Paso 1 Tomar h = ( b a ) / N ; t = a; w=; SALIDA ( t, w) . Paso 2 Para i = 1,2,..., N seguir los pasos 3-5 Paso 3 Tomar K1 = hf ( t , w) ; K 2 = hf ( t + h / 2, w + K1 / 2 ) ; K 3 = hf ( t + h / 2, w + K 2 / 2 ) ; K 4 = hf ( t + h, w + K 3 ) ; Paso 4 Tomar w = w + ( K1 + 2 K 2 + 2 K 3 + K 4 ) / 6; t = a + ih . Paso 5 SALIDA ( t, w) Paso 6 PARAR.

METODO DE EULER
Consideremos un conjunto de ecuaciones diferenciales de primer orden y ' = f ( t , y, z ) , y ( a ) = ' z = g ( t , y, z ) , z ( a ) = Las frmulas de aproximacin dadas por Euler son: wi +1 = wi + hf ( t i , wi , u i ) u i +1 = u i + hg ( t i , wi , u i )

ALGORITMO DE EULER PARA SISTEMAS Entrada: puntos extremos a , b; entero N; condiciones iniciales y . Salida: Aproximacin w de y y aproximacin u de z en los puntos ( N+1 ) valores de t. Paso 1 Tomar h = ( b a ) / N ; t = a; w=; u=.

Paso 2

SALIDA ( t , w, u ) . Para i = 1,2,..., N seguir los pasos 3-4 Paso 3 Tomar wi +1 = hf ( ti , wi , ui ) ;

Paso 5

ui +1 = ui + hg ( ti , wi , ui ) ; t = a + ih . Paso 4 SALIDA ( t , w, u ) . Parar.

Ejemplo Usar el mtodo de Euler para obtener aproximaciones a la solucin del problema de valor inicial y ' = y + t + 1, 0 t 1, y ( 0 ) = 1 con h = 0.1 , N = 10 y t i = 0.1i se obtienen los resultados que se muestran en la tabla Valores exactos Valores de Euler ti 0.0000000000 0.1000000000 0.2000000000 0.3000000000 0.4000000000 0.5000000000 0.6000000000 0.7000000000 0.8000000000 0.9000000000 1.0000000000 Ejemplo 1.0000000000 1.0048374180 1.0187307531 1.0408182207 1.0703200460 1.1065306597 1.1488116360 1.1965853038 1.2493289641 1.3065696597 1.3678794412 1.0000000000 1.0000000000 1.0100000000 1.0290000000 1.0561000000 1.0904900000 1.1314410000 1.1782969000 1.2304672100 1.2874204890 1.3486784401

También podría gustarte