How to compute $e^{At}$ with a $2\times2$ parametric matrix. I would like to calculate the exponential $e^{At}$ where $A$ is a $2\times2$ matrix:
$$
A=\left[\begin{array}{cc}
0 & 1 \\
a & b
\end{array}\right]
$$
and $a,b\in\mathbb R$. The calculus is based on the powers of this matrix, i.e.
$$e^{At}=I+tA+\frac{1}{2}t^2A^2+\frac{1}{3!}t^3A^3+ \cdots$$
But the power of $A$ seems to be very hard to unravel. For example:
$$A^2=\left[\begin{array}{cc}
a & b \\
ab & a+b^2
\end{array}\right], \quad A^3=\left[\begin{array}{cc}
ab & a+b^2 \\
a(a+b^2) & ab+b(a+b^2)
\end{array}\right], \quad \ldots
$$
Could you do better? Also, I wonder if anyone has already posed this problem by publishing (in literature) a few notes about it.
 A: For general $A,$ the trick would be to diagonalize $A.$
This particular matrix is easier if you know the general formula for linear recurrences. $A$ has the property that $A\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}y\\ax+by\end{pmatrix},$ so we can use it to define sequences $p_n,q_n$ as $$A^n\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}p_{n}\\p_{n+1}\end{pmatrix}\\A^n\begin{pmatrix}0\\1\end{pmatrix}=\begin{pmatrix}q_{n}\\q_{n+1}\end{pmatrix}$$
where $p_0=1,p_1=0,q_0=0,q_1=1$ and $$p_{n+2}=bp_{n+1}+ap_n\\ q_{n+2}=bq_{n+1}+aq_n$$
The general closed formula for $p_n,q_n$, when $b^2+4a$ is not zero, so we don't have repeated roots, is in terms of $x_{+},x_-=\frac{b\pm \sqrt{b^2+4a}}2:$
$$q_n = \frac{1}{\sqrt{b^2+4a}}\left(x_+^n-x_-^n\right)\\
p_n = \frac{1}{\sqrt{b^2+4a}}\left(x_+x_-^n-x_-x_+^n\right).$$
So: $$\sum_{k=0}^{\infty}\frac1{k!}(At)^k\begin{pmatrix}0\\1\end{pmatrix}=\begin{pmatrix}\sum_{k=0}^\infty\frac{q_{k}t^k}{k!}\\\sum_{k=0}^\infty\frac{q_{k+1}t^k}{k!}\end{pmatrix}=\frac{1}{\sqrt{b^2+4a}}\begin{pmatrix}e^{x_+t}-e^{x_-t}\\x_+e^{x_+t}-x_-e^{x_-t}\end{pmatrix}
$$
That should be the right column of $e^{At}.$ The left column is similarly calculated as:
$$\frac{1}{\sqrt{b^2+4a}}\begin{pmatrix}x_{+}e^{x_-t}-x_{-}e^{x_+t}\\a\left(e^{x_+t}-e^{x_-t}\right)\end{pmatrix}$$
This is all essentially equivalent to diagonalizing.
A bit more work will solve the case when $b^2+4a=0.$
A: The characteristic polynomial of $A$ is
$ \lambda (\lambda - b) - a = 0 $
which simplifies to
$\lambda^2 - b \lambda - a = 0 $
The eigenvalues are
$ \lambda_1 = \dfrac{1}{2} ( b - \sqrt{b^2 + 4 a} ) $
$\lambda_2 = \dfrac{1}{2} ( b + \sqrt{b^2 + 4 a } ) $
Now,
$ e^{A t} = a_0 I + a_1 (A t) $
And we have
$ e^{\lambda_1 t} = a_0 + a_1 \lambda_1 t $
$ e^{\lambda_2 t} = a_0 + a_1 \lambda_2 t $
Solving this linear system
$ a_0 = \dfrac{   \lambda_2 e^{\lambda_1 t} - \lambda_1 e^{\lambda_2 t} }{ \lambda_2 - \lambda_1 } $
$a_1 = \dfrac{ e^{\lambda_2 t} - e^{\lambda_1 t} }{ \lambda_2 - \lambda_1} $
Therefore,
$ e^{At} = \begin{bmatrix} a_0 && a_1 \\ a a_1 && a_0 + b a_1 \end{bmatrix} = \dfrac{1}{\lambda_2 - \lambda_1} \begin{bmatrix} \lambda_2 e^{\lambda_1 t} - \lambda_1 e^{\lambda_2 t}  && e^{\lambda_2 t} - e^{\lambda_1 t} \\
a (e^{\lambda_2 t} - e^{\lambda_1 t} ) && \lambda_2 e^{\lambda_1 t} - \lambda_1 e^{\lambda_2 t} + b (e^{\lambda_2 t} - e^{\lambda_1 t} ) \end{bmatrix}$
We now note that $ a = - \lambda_1 \lambda_2 $ and that $ b = \lambda_1 + \lambda_2 $.  Substituting this simplifies the expression above as follows
$ e^{A t} = \dfrac{1}{\lambda_2 - \lambda_1} \begin{bmatrix} \lambda_2 e^{\lambda_1 t} - \lambda_1 e^{\lambda_2 t}  && e^{\lambda_2 t} - e^{\lambda_1 t} \\ \lambda_1 \lambda_2 (e^{\lambda_1 t} - e^{\lambda_2 t} ) && \lambda_2 e^{\lambda_2 t} - \lambda_1 e^{\lambda_1 t} \end{bmatrix} $
In case the eigenvalues are equal, $\lambda_1 = \lambda_2 = \lambda$, then one can show using Laplace methods that
$ e^{A t} = \begin{bmatrix} e^{\lambda t} - \lambda t e^{\lambda t} && t e^{\lambda t} \\ - \lambda^2 t e^{\lambda t} && e^{\lambda t } + \lambda t e^{\lambda t} \end{bmatrix} $
