Diferenciales Unsa
Facultad de Producción y Servicios
Escuela Profesional de Ingeniería Sistemas
Curso : Ecuaciones Diferenciales
Tema : Problemasde Valor Inicial
Docente : Jorge Tarqui Ayala
Alumno:
Quispe Gutiérrez Giancarlos
Grupo: Lab. Miércoles 9 – 11 am
Arequipa - Perú
2012
TRABAJO NRO. 1
1. Elaborar en MATLAB elmétodo de Taylor de orden 3 con su fundamento matemático.
Dado el PVI:
dydx=ft,y yt0=y0 a≤t≤b
Suponga que: y=yt la aproximación usando Taylor 3será:
yt=yt0+y't0t-t0+ 12!y''t0t-t02+13!y'''t0t-t03
* Taylor orden 3 (código)
function [t,y] = Taylor3(t0,y0,T,p)
syms x y;
y1 = f;
fx = diff(y1,x);
fy = diff(y1,y);
y2 = fx +simplify(fy*f);
gx = diff(y2,x);
gy = diff(y2,y);
y3 = gx + simplify(gy*y2);
h = T/p;
t = zeros(p+1,1);
y = zeros(p+1,1);
t(1) = t0;
y(1) = y0;
for i=2 : 1 : p+1
t(i) =t(i-1) + h;
x = t(i-1);
y = y(i-1);
T3 = eval(y1) + (h/2)*eval(y2) + (h^2/6)*eval(y3);
y(i) = y(i-1) + h*T3;
end
plot(t,y,'.g')
* Taylor orden 3 (gráfica)La gráfica que se muestra a continuación es la que corresponde al PVI dado en el punto 3:
2. Elaborar en Matlab el método de Runge - Kutta de orden 4
* Runge – Kutta orden 4 (código)function [t, y] = Runge4(t0,y0,T,p)
h = T/p;
t = zeros(p+1, 1);
y = zeros(p+1, 1);
t(1) = t0;
y(1) = y0;
for i = 2:1: p+1;
t(i) = t(i-1) + h;
k1 = f(t(i-1), y(i-1));
k2 = f(t(i-1) +(1/2)*h, y(i-1) + (1/2)*h*k1);
k3 = f(t(i-1) + (1/2)*h, y(i-1) + (1/2)*h*k2);
k4 = f(t(i-1) + h, y(i-1) + h*k3);
y(i) = y(i-1) + (1/6)*(k1+2*k2+2*k3+k4)*h;
end
plot(t,y,'.r')* Runge – Kutta orden 4 (gráfica)
La gráfica que se muestra a continuación es la que corresponde al PVI dado en el punto 3:
3. Dado el PVI
dydt=tcost+yt+t, t ϵ 1,4...
Regístrate para leer el documento completo.