E_(x,i):=ELEMENT(x,i) EE_(x,i,j):=ELEMENT(x,i,j) D__(x):=DIMENSION(x) RR_(x):=ROW_REDUCE(x) I_(n):=IDENTITY_MATRIX(n) I_F(d):=#e^(-d*t) L_H(p,u,b,c):=p . u^(-1) . (INT(u . p^(-1) . b,t)+c) LINDIF_AUX(z,b,c):=L_H(E_(z,1),I_F(E_(z,2)),b,c) ZERO(n):=VECTOR(0,k,n) PUSHDOWN(a,k):=VECTOR(IF(in,a,IF(ABS(E_(a,k))=0,ROWHELP(DELROW(a,k),k,n-1),ROWHELP(~ a,k+1,n))) COLCLEAR(a):=ROWHELP(a`,1,D__(a`))` DISPLAY(a):=COLCLEAR(I_(D__(a))-FIX(a)) TOOTALL(a):=VECTOR(E_(a,i),i,1,D__(a`)) WIDEADD(a):=VECTOR(VECTOR(0,i,1,D__(a`)),j,1,D__(a`)-D__(a)) TOOWIDE(a):=APPEND(a,WIDEADD(a)) SQUARE(a):=IF(D__(a)=D__(a`),a,IF(D__(a)D__(es),b`,CHELP(a,APPEND(b,EIGENVECTOR(a,E_(es,n))`),n+~ 1,es)) CONJUGATE(a,es):=CHELP(a,EIGENVECTOR(a,E_(es,1))`,2,es) ES(a):=VRHS(EIGENVALUES(a)) "#################################################" "USER FUNCITONS" RANK(a):=ABS(RR_(RR_(a)`))^2 NULLSPACE(a):=DISPLAY(SQUARE(RR_(a))) EIGENVECTOR(a,e):=DISPLAY(RR_(e*I_(D__(a))-a)) DIAGONAL(a):=DT_H(a,CONJUGATE(a,ES(a))) MINPOLY(a):=E_(POLY(a) . NULLSPACE(BIG(a)),1) LINDIF(a,b,c):=LINDIF_AUX(DIAGONAL(a),b,c) "####################################################" "INSTRUCTIONS" "RANK(a) returns the rank of a" "NULLSPACE(a) returns a basis for the null space of a." "EIGENVECTOR(z,e) returns a basis for the eigenspace associated with" ".....the eigenvalue e of the matrix z" "If the matrix a is similar to a diagonal matrix" "..... DIAGONAL(a) returns [p_,d_] where d=p_^-1ap_" "..... It defines the letters p_ and d_ to be these matrices" "MINPOLY(A) returns the minimum polynomial of A." "If A is a diagonalizable matrix, then LINDIF(A, b, c)" " returns the solutions of the differential equations x'=Ax+b" " using t as the independant variable. " " c is a vector of integration constants supplied by the user." "WARNING. IF THE EIGENVALUES ARE COMPLICATED IRRATIONAL NUMBERS" "DERIVE MAY FAIL TO SIMPLIFY CERTAIN EXPRESSIONS TO ZERO" "IF THIS OCCURS, THE FUNCTIONS EIGENVECTOR(Z,E), CONJUGATE(Z,ES), " "DIAGONAL(A), AND LINDIF(A)" "MAY NOT WORK. (DERIVE MAY DETERMINE THAT eI-A IS A FULL RANK MATRIX.)" "##############################" "EXAMPLE MATRICES" [a_:=[[6,4,-6,0,2],[2,5,-4,0,2],[4,5,-5,0,3],[2,3,-4,2,2],[2,3,-4,-2,6]],b_:=[~ [37/30,-23/210,-7/30,1/21],[1/3,16/21,-1/3,4/21],[11/15,-19/105,4/15,-2/21],[3~ /10,13/70,-3/10,4/7]],c_:=[[3,2,5],[2,4,1],[3,2,4]],n_:=[[1,3,2,4,5],[3,2,5,5,~ 2],[4,5,7,9,7]]] "EXAMPLE 1" "Simplify the following expression to obtain the rank of n_" RANK(n_) "Example 2" "Simplify the following to obtain a basis for the null space of n_" NULLSPACE(n_) "EXAMPLE 3" "Simplify the following to obtain the eigenvalues of a_" EIGENVALUES(a_) "EXAMPLE 4" "Simplify the following to obtain a basis for the eigenspace" " of a_ associated with the eigenvalue 3" EIGENVECTOR(a_,3) "EXAMPLE 5" "Simplify the following expression to obtain the pair [p_,d_]" " where p_^-1 a p_ = d_. These letters are used to define these matrices." DIAGONAL(a_) "EXAMPLE 6" "Simplify the following to obtain the minimum polynomial of b_" MINPOLY(b_) "EXAMPLE 7" "Simplify the following to obtain the solution of" " x'=Ax+[t, 0, ˆ^t, 1, t]" LINDIF(a_,[t,0,#e^t,1,t],[d,e,f,g,h]) "###########################################" "SEE WARNING AT END OF INSTRUCTIONS" "################################"