I need to find $e^{At}$ I have this differential equation system
\begin{align}
x'(t) - 3 x(t) + y(t) - z(t) &= 0 \\
y'(t) - 2 x(t) - z(t) &= 0 \\
z'(t) - x(t) + y(t) - 2 z(t) &= 0
\end{align}
I wrote the equation in the form $X'=AX$. And the matrix $A$ has two eigenvalues, $\lambda= 1$ and $\lambda= 2$ with (multiplicity 2).  I think I found the right eigenvectors $(0,1,1)$ for eigenvalue 1 and $(1,1,0)$ and $(1,0,-1)$ for eigenvalue 2. I hope I got this right.
The answer is:
x -> Function[{t}, 
    E^(2 t) (1 + t) C[1] - E^(2 t) t C[2] + E^(2 t) t C[3]], 
  y -> Function[{t}, 
    E^t (-1 + E^t + E^t t) C[1] - E^t (-1 + E^t t) C[2] + 
     E^(2 t) t C[3]], 
  z -> Function[{t}, 
    E^t (-1 + E^t) C[1] - E^t (-1 + E^t) C[2] + E^(2 t) C[3]]}}
How do I write $e^{At}$?
Please help me, Thank you,
Klara
 A: Here is how you can find your matrix exponent. You can find first a fundamental matrix solution to the system
$$
\dot w=Aw,\quad w=(x,y,z)^T,
$$
if a fundamental matrix solution is $W(t)$ then the matrix exponent can be found as
$$
\exp\{At\}=W(t)W^{-1}(0).
$$
To find $W(t)$ you need your eigenvalues and eigenvectors. You have $\lambda_1=2$ (multiplicity 2) and $\lambda_2=1$. The first eigenvector is $v_1=(1,1,0)^T$ and the second one is $v_2=(0,1,1)^T$. So you have first solution
$$
w_1=e^{2t}v_1 
$$
and the second one
$$
w_2=e^{t}v_2
$$
You are still short for one more linearly independent solution to your system and can find it, e.g., with the help of the generalized eigenvectors, i.e., you need to solve
$$
(A-\lambda_1 I)^2 v=0
$$
you can find that $v=(1,1,1)^T$ works.
Thus the third required solution is
$$
w_3=e^{2t}(I+(A-\lambda_1I)t)v=\left(e^{2 t} (t+1),e^{2 t} (t+1),e^{2 t}\right)^T
$$
Now you form the matrix $W(t)$ out of your $w_1,w_2,w_3$. Find $W(0)$, find $W^{-1}(0)$ and finally get you answer
$$
e^{At}=W(t)W^{-1}(0)=\left(
\begin{array}{ccc}
 e^{2 t} (t+1) & -e^{2 t} t & e^{2 t} t \\
 e^t \left(e^t (t+1)-1\right) & e^t-e^{2 t} t & e^{2 t} t \\
 e^t \left(-1+e^t\right) & -e^t \left(-1+e^t\right) & e^{2 t} \\
\end{array}
\right)
$$
A: Here is an alternative approach that is based on using the Jordan form of $A$ to compute the exponential directly.
Let $v_1 = (0,1,1)^T, v_2=(1,1,0)^T,v_3=(0,0,1)^T$. We have $Av_1=v_1$, $Av_2 = 2 v_2$ and $Av_3 = v_2+2v_3$. In the basis $v_1,v_2,v_3$, the ODE becomes
\begin{eqnarray}
\dot{x_1} &=& x_1 \\
\dot{x_2} &=& 2 x_2 + x_3 \\
\dot{x_3} &=& 2 x_3
\end{eqnarray}
or more succinctly, $\dot{x} = J x$, where $A = V J V^{-1}$, where $V = \begin{bmatrix} v_1 & v_2 & v_3\end{bmatrix}$.
The solution is
\begin{eqnarray}
x_1(t) &=& x_1(0) e^t\\
x_2(t) &=& (x_2(0) +x_3(0) t) e^{2t} \\
x_3(t) &=& x_3(0) e^{2t}
\end{eqnarray}
To compute $e^{At}$ in the basis $v_1,v_2,v_3$, we solve the system from the initial conditions $x(0) = e_k$, $k=1,2,3$ and concatenate them together to get a solution. Substituting these initial conditions results in the system
$$ e^{Jt} = \begin{bmatrix} e^t & 0 & 0 \\
0 & e^{2t} & t e^{2t} \\
0 & 0 & e^{2t}\end{bmatrix} $$
from which we get
$$e^{At} = V e^{Jt} V^{-1}  = 
\begin{bmatrix} 
0 & 1 & 0  \\
1 & 1 & 0 \\
1 & 0 & 1
\end{bmatrix}
\begin{bmatrix} 
e^t & 0 & 0 \\
0 & e^{2t} & t e^{2t} \\
0 & 0 & e^{2t}
\end{bmatrix}
\begin{bmatrix} 
-1 & 1 & 0  \\
1 & 0 & 0 \\
1 & -1 & 1
\end{bmatrix}
$$
which works out to be the same as Artem's solution above.
A: $$\exp(At) = I + \dfrac{At}{1!} + \dfrac{A^2 t^2}{2!} + \dfrac{A^3 t^3}{3!} + \cdots + \dfrac{A^n t^n}{n!} + \cdots$$
If $A = P \Lambda P^{-1}$, then
$$\exp(At) = P \left(I + \dfrac{\Lambda t}{1!} + \dfrac{\Lambda ^2 t^2}{2!} + \dfrac{\Lambda ^3 t^3}{3!} + \cdots + \dfrac{\Lambda ^n t^n}{n!} + \cdots \right) P^{-1} = P \exp(\Lambda t) P^{-1}$$
$\Lambda^k$ is easy to find since $\Lambda$ is just a diagonal matrix i.e. if $$\Lambda = \begin{bmatrix} \lambda_1 & 0 & 0 & \cdots & 0 \\ 0 & \lambda_2 & 0 & \cdots & 0 \\ 0 & 0 & \lambda_3 & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & \lambda_m \end{bmatrix}$$ then
$$\Lambda^k = \begin{bmatrix} \lambda_1^k & 0 & 0 & \cdots & 0 \\ 0 & \lambda_2^k & 0 & \cdots & 0 \\ 0 & 0 & \lambda_3^k & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & \lambda_m^k \end{bmatrix}$$
Similarly, $$\exp(\Lambda t) = \begin{bmatrix} \exp(\lambda_1 t) & 0 & 0 & \cdots & 0 \\ 0 & \exp(\lambda_2 t) & 0 & \cdots & 0 \\ 0 & 0 & \exp(\lambda_3 t) & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & \exp(\lambda_m t) \end{bmatrix}$$
