I have a 3x3 matrix with non-zero entries ONLY along the main diagonal and the diagonal above. There are exactly two non zero diagonals in the matrix like this
\begin{pmatrix} a & 0 & 0 \\ d & b & 0 \\ 0 & e & c \\ \end{pmatrix}I would like to compute exp(A) or at least a good approximation. While this matrix looks quite simple, I need to compute the exponential several hundreds of time with slightly different matrices, hence I need an efficient algorithm.
Git, your matrices on the RHS do not commute.
With Maple, if $(b-c)(a-b)(a-c)\not=0$ then $e^A=\begin{pmatrix} e^a& 0& 0\\\dfrac{ -d(e^b-e^a)}{a-b}& e^b& 0\\\dfrac{ -ed(e^ba-e^bc-e^ab+e^ac-e^ca+e^cb)}{(-c+b)(a-b)(-c+a)}& \dfrac{e(-e^c+e^b)}{-c+b}& e^c\end{pmatrix}$