lecture9.mw

> with(DEtools):with(LinearAlgebra):

Inhomogeneous, nondiagonalizable

> A:=Matrix([ [ 3, 1, 2 ], [ -2, 6, 6 ], [ 1, -2, -1 ] ]);

A := Matrix([[3, 1, 2], [-2, 6, 6], [1, -2, -1]])

> M:=JordanForm(A,output='Q');

M := Matrix([[-2, 0, 5], [-10, -10, 10], [6, 5, -5]])

> J:=M^(-1).A.M;

J := Matrix([[2, 0, 0], [0, 3, 1], [0, 0, 3]])

> g:=Matrix([[-6+45*t],[-30-100*sin(t)+90*t],[18+50*sin(t)-45*t]]);

g := Matrix([[-6+45*t], [-30-100*sin(t)+90*t], [18+50*sin(t)-45*t]])

> h:=M^(-1).g;

h := Matrix([[3], [10*sin(t)], [9*t]])

> Calculate solution by hand here

> y:=Matrix([[-3/2],[t+2/3-cos(t)-3*sin(t)],[-3*t-1]]);

y := Matrix([[(-3)/2], [t+2/3-cos(t)-3*sin(t)], [-3*t-1]])

> x:=M.y;

x := Matrix([[-2-15*t], [-5/3-40*t+10*cos(t)+30*sin(t)], [-2/3+20*t-5*cos(t)-15*sin(t)]])

> Matrix([[diff(x[1,1],t)],[diff(x[2,1],t)],[diff(x[3,1],t)]]);

Matrix([[-15], [-40-10*sin(t)+30*cos(t)], [20+5*sin(t)-15*cos(t)]])

> A.x+g;

Matrix([[-15], [-40-10*sin(t)+30*cos(t)], [20+5*sin(t)-15*cos(t)]])

>