I am trying to implement some algorithm in matlab. To this end, I need to discretise a system of differential equation as $\dot x = A x + B u$.
Starting with initial condition $x_0$ the system after a single time step $h$ will reach $$ x(h) = e^{Ah}x_0 + \int_0^h e^{A(h-\tau)}Bu(\tau)d\tau. $$
Assuming $u(\tau)$ to be constant in $[0,h]$, the previous expresion reduces to $$ x(h) = e^{Ah}x_0 + \left (\int_0^h e^{As}ds\right ) Bu, $$ with $s =h-\tau$.
The first exponential matrix $e^{Ah}$ is calculated with matlab command
expm(A*h).
As far as I know, there is no command which approximate the term $\int_0^h e^{As}ds$ so I thought to use the expansion series to approximate it as
$$ \int_0^h e^{As}ds = \int_0^h I + As + \frac{1}{2}A^2 s^2 + \cdots ds \\ = Ih + \frac{1}{2}Ah^2 + \frac{1}{6}A^2 h^3 + \cdots $$
I evaluate this expression in matlab up to some degree. The method works right but I'd like to ask you if there is a better approximation to it (maybe padé?).
This is EXACTLY from Wikipedia https://en.wikipedia.org/wiki/Matrix_exponential
"If $P$ and $Q_t$ are nonzero polynomials in one variable, such that $P(A)=0$, and if the memorphic function
$f(z)=\frac{e^{tz}-Q_t(z)}{P(z)}$
is entire, then $e^{tA}=Q_t(A)$"