1.32 Find \(e^{A t}\) where A is a matrix

Mathematica

ClearAll["Global`*"] 
mat={{0,1}, 
     {-2,-3}} 
MatrixExp[mat t]; 
MatrixForm[%]
 

\[ \left ( {\begin {array}{cc} -e^{-2 t}+2 e^{-t} & -e^{-2 t}+e^{-t} \\ 2 e^{-2 t}-2 e^{-t} & 2 e^{-2 t}-e^{-t} \\ \end {array}} \right ) \]

Now verify the result by solving for \(e^{At}\) using the method would one would do by hand, if a computer was not around. There are a number of methods to do this by hand. The eigenvalue method, based on the Cayley Hamilton theorem will be used here. Find the eigenvalues of \(|A-\lambda I|\)

m = mat-lambda IdentityMatrix[Length[mat]]
 

\[ \left ( {\begin {array}{cc} -\lambda & 1 \\ -2 & -\lambda -3 \\ \end {array}} \right ) \]

Det[m]
 

\[ \lambda ^2+3 \lambda +2 \]

sol=Solve[%==0,lambda]
 
    Out[15]= {{lambda->-2},{lambda->-1}}
 
eig1=lambda/.sol[[1]] 
eig2=lambda/.sol[[2]]
 
      Out[16]= -2 
      Out[17]= -1
 
(*setup the equations to find b0,b1*) 
eq1 = Exp[eig1 t]==b0+b1 eig1; 
eq2 = Exp[eig2 t]==b0+b1 eig2; 
sol = First@Solve[{eq1,eq2},{b0,b1}]
 

\[ \left \{\text {b0}\to e^{-2 t} \left (2 e^t-1\right ),\text {b1}\to e^{-2 t} \left (e^t-1\right )\right \} \]

(*Now find e^At*) 
b0=b0/.sol[[1]]
 

\[ e^{-2 t} \left (2 e^t-1\right ) \]

b1=b1/.sol[[2]]
 

\[ e^{-2 t} \left (e^t-1\right ) \]

b0 IdentityMatrix[Length[mat]]+b1 mat; 
Simplify[%] 
MatrixForm[%]
 

\[ \left ( {\begin {array}{cc} e^{-2 t} \left (-1+2 e^t\right ) & e^{-2 t} \left (-1+e^t\right ) \\ -2 e^{-2 t} \left (-1+e^t\right ) & -e^{-2 t} \left (-2+e^t\right ) \\ \end {array}} \right ) \] The answer is the same given by Mathematica’s command MatrixExp[]

Matlab

syms t 
A=[0 1;-2 -3]; 
expm(t*A)
 
ans = 
 
[2/exp(t)-1/exp(2*t),1/exp(t)-1/exp(2*t)] 
[2/exp(2*t)-2/exp(t),2/exp(2*t)-1/exp(t)]
                                                                                    
                                                                                    
 
pretty(ans)
 
+-                                        -+ 
| 2 exp(-t)-  exp(-2 t),exp(-t)-exp(-2 t)  | 
|                                          | 
| 2 exp(-2 t)-2 exp(-t),2 exp(-2 t)-exp(-t)| 
+-                                        -+
 

Maple

restart; 
A:=Matrix([[0,1],[-2,-3]]); 
LinearAlgebra:-MatrixExponential(A,t);
 

\[ \left [\begin {array}{cc} -{\mathrm e}^{-2 t}+2 \,{\mathrm e}^{-t} & {\mathrm e}^{-t}-{\mathrm e}^{-2 t} \\ -2 \,{\mathrm e}^{-t}+2 \,{\mathrm e}^{-2 t} & 2 \,{\mathrm e}^{-2 t}-{\mathrm e}^{-t} \end {array}\right ] \]