# 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

-
If you can diagonalize $A = U \Lambda U^{-1}$, then you have $e^{At} = U e^{\Lambda t} U^{-1}$. The exponential of a diagonal matrix is particularly easy to compute... – copper.hat Nov 19 '12 at 1:16
I think your second eigenvalue is incorrect? I get $\lambda = 2 \pm i \sqrt{2}$. – copper.hat Nov 19 '12 at 1:23
@copper are you sure I just redid it and lambda is 2. – Klara Nov 19 '12 at 1:39
My apologies, I thought the last equation had a $+x(t)$. You are correct. – copper.hat Nov 19 '12 at 2:14
This is not as simple as the exponential of a diagonal matrix... – copper.hat Nov 19 '12 at 2:18

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.

-
great solution as always, this has helped me a lot. I just don't seem to understand how you get Av_3=v_2+2v_3. Can you help me? – Klara Nov 19 '12 at 21:46
I'm not exactly sure what you are asking. Generally the dimension of $\ker (A-\lambda I)$ corresponds to the multiplicity of the eigenvalue $\lambda$. Sometimes this is not the case (which gives rise to Jordan blocks). When this happens we look for generalized eigenvectors which are elements of $\ker (A-\lambda I)^k$ (here $k=2$). This means $(A-\lambda I)^2 x = 0$, which means that $w=(A-\lambda I)x \in \ker (A-\lambda I)$. Since the latter space is one dimensional, we may take $w = v_2$ and let $v_3$ be the corresponding $x$. Then $Ax = \lambda x + w$, or $A v_3 = 2 v_3 + v_2$. – copper.hat Nov 19 '12 at 22:20
Thank you for explaining it to me. I'm new to the Jordan form.What would you do is the multiplicity of lambda is 3 and you have only one eigenvalue? – Klara Nov 24 '12 at 3:25
You would need to find the first value of $k$ such that $\dim \ker (\lambda I -A)^k$ equals the multiplicity of the eigenvalue (and such a $k$ always exists). As an aside, the Jordan form is a very useful theoretical tool, but unusable in practice. In practice the Schur form is better suited for practical computation. – copper.hat Nov 24 '12 at 4:21
Thank you, I appreciate it. – Klara Nov 27 '12 at 2:34

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)$$

-
thank you so much, after spending more than a day on this I really needed help! – Klara Nov 19 '12 at 3:07
@Klara I skipped quite a few calculations here, so you still need to fill in some gaps. – Artem Nov 19 '12 at 3:08
@ Artem I understand, I am fine..I need the practice! – Klara Nov 19 '12 at 3:09
my W_3 looks like (1-t)^e^2t not(1+t)e^2t? – Klara Nov 19 '12 at 4:19
I checked my calculations, they seem to be ok. – Artem Nov 19 '12 at 5:00

$$\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}$$

-