EXERCICE 1

ode2('diff(y,t,3)-2*'diff(y,t,2)-'diff(y,t)+2*y,y,t);

A:matrix([0,1,0],[0,0,1],[-2,1,2]);

eigenvectors(A);

D:matrix(
 [2,0,0], 
 [0,-1,0], 
 [0,0,1]
);

P:transpose(matrix([1,2,4],[1,-1,1],[1,1,1]));

Pinv:invert(P);

Z0:Pinv.matrix([1],[3],[-1]);

eq1:ode2('diff(z1,t)=2*z1,z1,t);

ic1(eq1,t=0,z1=-2/3);

eq2:ode2('diff(z2,t)=-z2,z2,t);

ic1(eq2,t=0,z2=-4/3);

eq3:ode2('diff(z3,t)=z3,z3,t);

ic1(eq3,t=0,z3=3);

Y:P.matrix([-(2*%e^(2*t))/3],[-(4*%e^(-t))/3],[3*%e^t]);

exp:desolve(['diff(y1(t),t)=y2(t),'diff(y2(t),t)=y3(t),'diff(y3(t),t)=2*y3(t)+y2(t)-2*y1(t)],[y1(t),y2(t),y3(t)]);

wxplot2d([-(2*%e^(2*t))/3+3*%e^t-(4*%e^(-t))/3],[t,0,2]);

EXERCICE 3

load(plotdf);

plotdf([y,-sin(x)],[x,-6,6]);