prct22 runge kutta
DESCRIPTION
metodos numericosTRANSCRIPT
EULER MEJORADO
EULER MEJORADO2
ANLISIS NUMRICO1PRCTICA 22
Runge-Kutta 4 orden.
Fecha de entrega del reporte: 16/5/2013.Grupo:_ 3AV3____
Nombre del Alumno: ____Gerardo Daniel Aguilar Jurez_ Boleta: __2012302343__
Nombre del Profesor: __Miguel Jimnez Guzmn _
NDICE
1. Objetivos
2. Anlisis del mtodo
3. Aplicaciones del mtodo
4. Programacin en MATLAB
1. OBJETIVO DE LA PRCTICA
1. Anlisis del mtodo:
Comprender el concepto del mtodo de Runge-Kutta 4 orden.
2. Aplicacin del mtodo :
Una vez comprendido la teora del mtodo, se realiza un ejercicio a mano como ejemplo del uso de este.
3. Programacin en MATLAB:
Analizar el mtodo para generar un cdigo de programacin que funcione en MATLAB.
2. ANLISIS DEL MTODO
3. APLICACIN DEL MTODO
4. PROGRAMACIN EN MATLAB.
Cdigo en MATLABfunction fclear;clc;fprintf('\n \tRESOLUCION DE ECUACIONES DIFERENCIALES POR MEDIO RUNGE-KUTTA DE ORDEN 4\n')f=input('\n Ingrese la ecuacion diferencial\n','s');x0=input('\n Ingrese el primer punto x0:\n');x1=input('\n Ingrese el segundo punto x1:\n');y0=input('\n Ingrese la condicion inicial y(x0):\n');n=input('\n Ingrese el numero de pasos n:\n');h=(x1-x0)/(n-1);xs=x0:h:x1;
fprintf('\n''it \t x0 \t y(x1)');it=0;fprintf('\n%2.0f%10.6f%10.6f\n',it,x0,y0);
for i=1:n-1it=i;x0=xs(i);x=x0;y=y0;k1=h*eval(f);x=x0+(h/2);y=y0+(k1/2);k2=h*eval(f);x=x0+(h/2);y=y0+((k2)/2);k3=h*eval(f);x=x0+h;y=y0+k3;k4=h*eval(f);y0=y0+(k1+2*k2+2*k3+k4)/6;fprintf('\n%2.0f%10.6f%10.6f\n',it,x0,y0);endfprintf('\n El punto aproximado y(x1) es = %8.6f\n',y0); Capturas