Putzer Algorithm For Computing
Given a matrix with eigenvalues then
Where
The equations for are simple first order nonhomogeneous ODEs.
Notice the algorithm does not require that the matrix is diagonalizable and avoids the complexity of using Jordan canonical form when it is not needed.
Read more about this topic: Matrix Differential Equation