Computing an exponential of matrix via cayley-hamilton I want to compute the exponential $e^{At}$ of
$$A=\left( \begin{matrix} 5&2 \\ 0&5 \end{matrix}\right)$$
via Cayley-Hamilton theorem.
So, the formula is:
$$e^{At}=\alpha_0I+\alpha_1A$$
In order to find $\alpha_0$ and $\alpha_1$, I have to solve the following system of equations:
$$\begin{cases}
e^{5t}=\alpha_0+5\alpha_1\\[1ex]
te^{5t}=\alpha_1
\end{cases}$$
I don't really know if I formulated the system of equations correctly, because when I compute this in MATLAB I got a different result in respect to the one given by the MATLAB function expm:


A=[5 2;0 5];
syms t
expm(A*t) %computing by MATLAB function
% Computing by Cayley-Hamilton:
B=[exp(5*t);t*exp(5*t)];
C=[1 5;0 1];
X=C\B;
exponential=X(1,1)*eye(2)+X(2,1)*A


The results are:
By MATLAB:
[ exp(5*t), 2*t*exp(5*t); 0,     exp(5*t)]
By 'what I did'
[ exp(5*t) - 4*t*exp(5*t),            5*t*exp(5*t); 0, exp(5*t) - 4*t*exp(5*t)]
They are different. So what am I doing wrong here?
 A: Instead of relying on a memorized formula, try working directly with what the Cayley-Hamilton theorem tells you.  
Since $A$ is upper-triangular, we see immediately that it has a repeated eigenvalue of $5$, so by C-H we know that $(A-5I)^2=0$. In other words, $A$ can be decomposed into the sum of the diagonal matrix $5I$ and the nilpotent matrix $N=A-5I$, with $N^2=0$. As Will Jagy points out in his comment, these two matrices commute, so $$\exp(tA)=\exp(5tI)\exp(tN).$$ Since $N$ is nilpotent, the series for its exponential gets truncated after a couple of terms, giving $\exp(tN)=I+tN$. Multiplying by a scalar multiple of the identity matrix amounts to scalar multiplication, so putting it all together we get $$\exp(tA)=e^{5t}(I+tN)=\pmatrix{e^{5t}&2te^{5t}\\0&e^{5t}},$$ just as MATLAB computed.  
Update: To relate this to the method in the paper you cite, note that $\alpha_0I+\alpha_1A=(\alpha_0+5\alpha_1)I + \alpha_1N$, which yields the system $$\begin{align}\alpha_0+5\alpha_1&=e^{5t}\\\alpha_1&=te^{5t},\end{align}$$ as you had, with solution $$\begin{align}\alpha_0&=e^{5t}(1-5t)\\\alpha_1&=te^{5t}.\end{align}$$ It would appear that you’ve made an arithmetic error somewhere, since you’ve got $(1-4t)$ instead. Note that the second equation in this system is what you’d get by differentiating the first, as per the note on repeated eigenvalues at the end of the paper.  
P.S.: More generally, for a $2\times2$ matrix $A$ with repeated eigenvalue $\lambda$, we have $$\begin{align}e^{tA}&=e^{\lambda t}(I+tN)\\&=e^{\lambda t}(I+tA-\lambda tI)\\&=(1-\lambda t)e^{\lambda t}I+te^{\lambda t}A,\end{align}$$ so $\alpha_0=(1-\lambda t)e^{\lambda t}$ and $\alpha_1=te^{\lambda t}$.
A: A way to compute the $\alpha$-coefficients is to note that $$\frac {d}{dt}e^{At}= \dot{\alpha}_0I+\dot{\alpha}_1 A=Ae^{At}=\alpha_0 A+\alpha_1 A^2.$$ This is a first-order system of ODEs which can be solved to yield the $\alpha$'s.

I decided I should fill in the steps above, and in particular do so in a way that takes advantage of the structure of $A$. As noted, the Cayley-Hamilton theorem implies that $e^{At}=\alpha_0I+\alpha_1 A$ for some $\alpha_0,\alpha_1$. But $A=5I+N$ where $N^2=0$, so we may just as well write the above as $e^{At}=\alpha I+\beta N$ for some $\alpha,\beta$. Then $$\frac {d}{dt}e^{At}= \dot{\alpha}I+\dot{\beta} N=Ae^{At}=(N+5I)(\alpha I+\beta N)=5\alpha I+(\alpha+5\beta)N,$$ which upon taking matrix elements yields the first-order ODEs $\dot{\alpha}=5\alpha, \dot{\beta}=\alpha+5\beta$. Since $e^{At}|_0=I = \alpha(0)I+\beta(0) N$, we have the initial conditions $\alpha(0)=1$ and $\beta(0)=0$. The system of ODES is then readily solved and yields $$e^{At}=\alpha(t)I+\beta(t)N=e^{5t}I+t e^{5t}N$$ which is the solution found by MATLAB.
