Square root of a $2 \times 2$ matrix 
How can I find the square root of the following non-diagonalisable matrix?
$$\begin{pmatrix}
  5 & -1 \\
  4 & 1
 \end{pmatrix}$$

I have shown that
$$A^{n}=3^{n-1}\begin{pmatrix}
  2n+3 & -n \\
  4n & 3-2n
 \end{pmatrix}$$
though I'm not sure how to use this fact.

The Jordan decomposition $A=SJS^{-1}$ is given by the matrices $$S = \begin{pmatrix}1&\frac12\\2&0 \end{pmatrix},\quad J = \begin{pmatrix}3&1\\0&3 \end{pmatrix}. $$
Let $\lambda = 3$ and write $J = \lambda (I+K)$, where $$K=\begin{pmatrix}0&\frac13\\0&0 \end{pmatrix}.$$ Using the Mercator series, we compute the logarithm of $J$:
\begin{align}
\log J &= \log(\lambda(I+K))\\
&= \log(\lambda I) + \log (I+K)\\
&= 0 + \sum_{n=1}^\infty (-1)^{n+1}\frac{K^n}n\\
&= \begin{pmatrix}0&\log\frac43\\0&0 \end{pmatrix}.
\end{align}
Write $J=S^{-1}AS$, then we have
\begin{align}
\log A &= S(\log J) S^{-1}\\
&= \begin{pmatrix}1&\frac12\\2&0 \end{pmatrix}\begin{pmatrix}0&\log\frac43\\0&0 \end{pmatrix}\begin{pmatrix}0&\frac12\\2&-1 \end{pmatrix}\\
&= \begin{pmatrix}\frac23+\log 3&-\frac13\\\frac43&-\frac23+\log3 \end{pmatrix}.
\end{align}
It follows that
$$A^{\frac12} = e^{\log\left(A^{\frac12}\right)}
= e^{\frac12\log A}
= \frac{1}{\sqrt{3}}\begin{pmatrix} 4 & -\frac{1}{2} \cr 2 & 2 \end{pmatrix}.
$$
By the way, there is a very similar formula for power of $\log A$:
$$(\log A)^n = \frac13(\log 3)^{n-1}\begin{pmatrix}2n+3\log 3& -n\\ 4n& -2n+3\log 3 \end{pmatrix}. $$
