> | with(DEtools):with(LinearAlgebra): |
Inhomogeneous, nondiagonalizable
> | A:=Matrix([ [ 3, 1, 2 ], [ -2, 6, 6 ], [ 1, -2, -1 ] ]); |
> | M:=JordanForm(A,output='Q'); |
> | J:=M^(-1).A.M; |
> | g:=Matrix([[-6+45*t],[-30-100*sin(t)+90*t],[18+50*sin(t)-45*t]]); |
> | h:=M^(-1).g; |
> | Calculate solution by hand here |
> | y:=Matrix([[-3/2],[t+2/3-cos(t)-3*sin(t)],[-3*t-1]]); |
> | x:=M.y; |
> | Matrix([[diff(x[1,1],t)],[diff(x[2,1],t)],[diff(x[3,1],t)]]); |
> | A.x+g; |
> |