Let $A$ be a singular square matrix and $\omega,t\in\mathbb{R}^{*+}$. How to compute the following integral?
$$I = \int_0^t e^{sA}\cos(\omega s)\,\mathrm{d}s$$
Since I am looking for a numerical solutions, I am open to approximations. For example, $$ I = \sum_{k=0}^\infty \int_0^t \dfrac{(sA)^k}{k!} \cos(\omega s)\,\mathrm{d}s = \sum_{k=0}^\infty \dfrac{A^k}{k!}\int_0^t s^k \cos(\omega s)\,\mathrm{d}s$$
so I can truncate the above sum but I'm wondering if there is a more ingenious approach.