Matrix exponential integral over external parameter Given a matrix $A$, consider the matrix exponential $e^{Ax}$, where $A$ does not depend on the parameter $x$. How can we evaluate an expression of the following form?
\begin{eqnarray}
\int_{a}^{b} dx e^{Ax}=?
\end{eqnarray}
Using the series expansion I get:
\begin{eqnarray}
\sum_{n=0}^{\infty}\int_{a}^{b}dx\frac{(Ax)^{n}}{n!}=A^{-1}\sum_{n=0}^{+\infty}\frac{(Ax)^{n+1}}{(n+1)!}\bigg|_{a}^{b}=A^{-1}\left(e^{Ax}-1\right)\bigg|_{a}^{b}
\end{eqnarray}
Simplifying further gives:
\begin{eqnarray}
A^{-1}\left(e^{Ab}-e^{Aa}\right).
\end{eqnarray}
 A: $
\def\p{\partial}
\def\A{A^D}
\def\E{e^{tA}}
\def\LR#1{\left(#1\right)}
\def\BR#1{\Big(#1\Big)}
\def\op#1{\operatorname{#1}}
\def\trace#1{\op{Tr}\LR{#1}}
\def\ndx#1{\op{index}\LR{#1}}
\def\rnk#1{\op{rank}\LR{#1}}
\def\qiq{\quad\implies\quad}
\def\grad#1#2{\frac{\p #1}{\p #2}}
\def\c#1{\color{red}{#1}}
\def\CLR#1{\c{\LR{#1}}}
\def\fracLR#1#2{\LR{\frac{#1}{#2}}}
$Your calculation is okay, except that you failed to consider singular matrices, which may not even be a concern for your intended purposes.
If singular matrices are a concern, then I would recommend consulting
$\;$ Matrix Mathematics: Theory, Facts, and Formulas $\,$ by Bernstein
The full solution involves the Drazin inverse $\A$
$$\eqalign{
\int \E\:dt 
 &= \A\E + \LR{I-A\A}\sum_{j=1}^k \fracLR{t^j}{j!}A^{j-1} +C \\
}$$
where $C$ is a constant of integration, $A^0=I,\,$ and $k$ is the smallest integer such that
$$\rnk{A^k} = \rnk{A^{k+1}} \qiq k=\ndx{A}$$
If $A$ is invertible, then $\A$ is the standard matrix inverse and the second term disappears.
The reason that the sum cuts off at $j=k$ is due to the following property of the Drazin inverse
$$\eqalign{
A\A A^{j-1} &\ne A^{j-1} \qquad ({\rm for}\:j\le k) \\
A\A A^k &= A^k \\
}$$
The Drazin inverse is a tool which is more theoretical than practical, so here's a nice way to evaluate the integral without calculating the Drazin inverse (which is notoriously difficult).
Better yet, if you have access to a matrix library which provides the
phi-function (e.g. ExpoKit) then you can use this exact result
$$\eqalign{
\int  e^{At}dt
 = t\cdot\phi(At)\;+\; C \\
}$$
