Section 4. Matrix Methods
3.* Define the three column vectors b1, b2, b3 as follows
b1,b2,b3 := <0,1,-1>,<1,1,0>,<-1,0,1>;
> | with(LinearAlgebra): |
> | b1,b2,b3 := <0,1,-1>,<1,1,0>,<-1,0,1>; |
a. Define the matrix B having b1, b2, b3 as its columns with the entry B := <b1|b2|,b3>.
> | B := <b1|b2|b3>; |
b. Find the characteristic polynomial of B and factor it with factor(%).
> | CharacteristicPolynomial(B,t);
factor(%); |
c. Find B's eigenvalues with Eigenvalues(B).
> | Eigenvalues(B); |
d. Find B's eigenvectors using Eigenvectors(B). Name the input lambda,V.
> | lambda,V := Eigenvectors(B); |
e. Calculate MatrixInverse(V).B.V.
> | MatrixInverse(V).B.V; |
4.* Continuing 3. Obtain the solution to v' = Bv satisfying v(0) = <1,2,3>.
a. Do if first using dsolve applied to the system of linear differential equations defined by v' = Bv with the appropriate initial conditions.
> | u := <x(t),y(t),z(t)>:
DEsystem := 'diff(u[k],t) = (B.u)[k]' $ k=1..3; |
> | soln := dsolve( {DEsystem,x(0)=1,y(0)=2,z(0)=3} ); |
> | VectorForm = subs(soln,u); |
> | Check;
eval(%%,t=0); eval(DEsystem,soln); |
b. Do it second by making a fundamental matrix solution X(t) defined as the matrix with the eigenvector solutions in the columns then computing
> | for k from 1 to 3 do W[k] := exp(lambda[k]*t)*Column(V,k): end do: unassign('k'); |
> | <W[1]|W[2]|W[3]>;
X := unapply(%,t): |
> | v := X(t).X(0)^(-1).<1,2,3>; |
> | Check;
eval(v,t=0); map(diff,v,t) = B.v; |
c. To it third by using the Matrix Exponential, Exp_At. Once you have it, the solution is
> | Exp_At := MatrixExponential(B,t); |
> | v := Exp_At.<1,2,3>; |
> | Check;
See_above; |
d. Check the solution in each case.