Problem #8 in 7.6.

I am going to need several packages. (Ignore warning statements.)

> with(DEtools):with(linalg):with(plots):with(LinearAlgebra):

Warning, the name adjoint has been redefined

Warning, the name adjoint has been redefined

Warning, the name changecoords has been redefined

Warning, the assigned name GramSchmidt now has a global binding

First, I will just plot a few solution curves:

> DEplot3d(
[D(x)(t)=-3*x(t)+2*z(t),D(y)(t)=x(t)-y(t),D(z)(t)=-2*x(t)-y(t)],
[x(t),y(t),z(t)],t=0..5,
[[x(0)=1,y(0)=1,z(0)=1],[x(0)=-1,y(0)=-1,z(0)=-1],
[x(0)=1,y(0)=-1,z(0)=-1],[x(0)=-1,y(0)=1,z(0)=1],
[x(0)=1,y(0)=-1,z(0)=1/2],[x(0)=-1,y(0)=1,z(0)=-1/2],
[x(0)=1,y(0)=1,z(0)=0]],
x=-1.5..1.5,y=-1.5..1.5,view=-1.5..1.5,
linecolor=[red,black,black,green,blue,yellow,pink],
thickness=3,stepsize=0.1);

[Maple Plot]

> solplots:=%: We save the plots for latter use.

Next we find the eigenvectors.

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

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

> eigenvectors(A);

[-2, 1, {vector([2, -2, 1])}], [-1+I*sqrt(2), 1, {v...
[-2, 1, {vector([2, -2, 1])}], [-1+I*sqrt(2), 1, {v...

We can see that the eigenvector [2,-2,1]^T cooresponds to the eigenspace given by the black line in the plot above.

But the two complex eigenvalues give an inward spiral in some 2-dimensional subspace. How can we find the equation for this plane? This is not done in your textbook.

I can get the coordinate transformation matrix used in diagonalizing A as follows.

> B:=jordan(A,`P`);

B := matrix([[-2, 0, 0], [0, -1-I*sqrt(2), 0], [0, ...

> evalm(P);

matrix([[2/3, -1/3*I*sqrt(2)+1/6, 1/3*I*sqrt(2)+1/6...

Thus we B=P^(-1)AP. However B is complex. I can create a new similar matrix that is almost diagonial.

> Q:=matrix([[1,0,0],[0,1/2,I/2],[0,1/2,-I/2]]);

Q := matrix([[1, 0, 0], [0, 1/2, 1/2*I], [0, 1/2, -...

> C:=simplify(evalm(inverse(Q)&*B&*Q));

C := matrix([[-2, 0, 0], [0, -1, sqrt(2)], [0, -sqr...

It follows that C = Q^(-1)P^(-1)APQ. Let R=PQ.

> R:=simplify(evalm(P&*Q));

R := matrix([[2/3, 1/6, 1/3*sqrt(2)], [-2/3, 1/3, -...

The second two column vectors of R give a basis for the subspace we want. I'll compute their cross product to get a normal vector and hance deduce an equation for the plane.

> CrossProduct(<2,4,-2>,<4*sqrt(2),-sqrt(2),5*sqrt(2)>);

_rtable[134705200]

So x-y-z=0, or z=x-y. We will plot the plane and overlay it with the solution curves graph.

> plane:=plot3d(x-y,x=-1.5..1.5,y=-1.5..1.5,view=-1.5..1.5,color=gray):

> display(solplots,plane);

[Maple Plot]

The red curve should lie completely in the plane.

Next we find explicitly the general solution.

> sys1 := diff(x(t),t) = -3*x(t)+2*z(t),
diff(y(t),t) = x(t)-y(t),
diff(z(t),t) = -2*x(t)-y(t) ;

sys1 := diff(x(t),t) = -3*x(t)+2*z(t), diff(y(t),t)...

> dsolve({sys1});

{x(t) = _C1*exp(-2*t)+_C2*exp(-t)*sin(sqrt(2)*t)+_C...
{x(t) = _C1*exp(-2*t)+_C2*exp(-t)*sin(sqrt(2)*t)+_C...
{x(t) = _C1*exp(-2*t)+_C2*exp(-t)*sin(sqrt(2)*t)+_C...
{x(t) = _C1*exp(-2*t)+_C2*exp(-t)*sin(sqrt(2)*t)+_C...

You can specify initial conditions as foloows.

> intcond:=x(0)=2,y(0)=3,z(0)=1;

intcond := x(0) = 2, y(0) = 3, z(0) = 1

> dsolve({sys1,intcond},{x(t),y(t),z(t)});

{y(t) = 4/3*exp(-2*t)+5/3*exp(-t)*cos(sqrt(2)*t)+5/...
{y(t) = 4/3*exp(-2*t)+5/3*exp(-t)*cos(sqrt(2)*t)+5/...
{y(t) = 4/3*exp(-2*t)+5/3*exp(-t)*cos(sqrt(2)*t)+5/...

> spacecurve([
-4/3*exp(-2*t)-5/3*sqrt(2)*exp(-t)*sin(sqrt(2)*t)+10/3*exp(-t)*cos(sqrt(2)*t), 4/3*exp(-2*t)+5/3*exp(-t)*cos(sqrt(2)*t)+5/3*sqrt(2)*exp(-t)*sin(sqrt(2)*t),
-2/3*exp(-2*t)-10/3*sqrt(2)*exp(-t)*sin(sqrt(2)*t)+5/3*exp(-t)*cos(sqrt(2)*t),
t=0..9],x=0..3,y=0..3,color=red,thickness=3);

[Maple Plot]

>