I am struggling with computing the length of a vector-valued curve function $\mathbf{f} : \mathbb{R} \rightarrow \mathbb{R}^n$ which is defined as
$$ \mathbf{f}(t) = e^{\mathbf{A}t}\mathbf{x}_0 + \mathbf{A}^{-1}(e^{\mathbf{A}t} - \mathbf{I}_n)\mathbf{B}u. $$
A lot of you might recognize this curve as the solution for a linear system of first order differential equations (state-space representation), assuming constant scalar input $u$, where $\mathbf{A}\in\mathbb{R}^{n\times n}$ is a non-singular "system" matrix, $\mathbf{x}_0\in\mathbb{R}^n$ is an initial state vector, $\mathbf{B}\in\mathbb{R}^{n\times 1}$ is a single input scaling matrix and $\mathbf{I}_n$ is the n-dimensional identity matrix. It is in fact a state trajectory for a particular input $u$.
From my knowledge, the length $L$ of the curve for $t \in [0,t_1]$ is defined as $$ L = \int_0^{t_1} \lVert \dot{\mathbf{f}}(t) \rVert_2 dt = \int_0^{t_1} \sqrt{\dot{\mathbf{f}}^{\intercal}(t)\dot{\mathbf{f}}(t)}dt, $$
My attempt at tackling this problem is to first find the derivative $$ \dot{\mathbf{f}}(t) = \mathbf{A}e^{\mathbf{A}t}\mathbf{x}_0 + e^{\mathbf{A}t}\mathbf{B}u, $$ and then the quadratic form $$ \dot{\mathbf{f}}^{\intercal}(t)\dot{\mathbf{f}}(t) = (\mathbf{A}e^{\mathbf{A}t}\mathbf{x}_0 + e^{\mathbf{A}t}\mathbf{B}u)^{\intercal}(\mathbf{A}e^{\mathbf{A}t}\mathbf{x}_0 + e^{\mathbf{A}t}\mathbf{B}u) = (\mathbf{A}\mathbf{x}_0 + \mathbf{B}u)^{\intercal}e^{(\mathbf{A} + \mathbf{A}^\intercal) t}(\mathbf{A}\mathbf{x}_0 + \mathbf{B}u) = \mathbf{v}^\intercal e^{\mathbf{M}t} \mathbf{v}, $$
where $\mathbf{v} = \mathbf{A}\mathbf{x}_0 + \mathbf{B}u$ and $\mathbf{M} = \mathbf{A}^\intercal + \mathbf{A}$.
Thus \begin{equation} L = \int_0^{t_1} \sqrt{\mathbf{v}^\intercal e^{\mathbf{M}t} \mathbf{v}} dt. \end{equation}
Now my question in particular is if there is an analytical solution to this integral and if yes how to solve it. In particular is there some special trick or property that I can use to simplify the integral and solve it?
Otherwise, what would be the most appropriate numerical method to compute the length?
In addition I want to further compute the centroid of this curve, which I assume is defined as $$ \bar{\mathbf{x}} = \frac{\int_0^{t_1} \mathbf{f}(t) \sqrt{\mathbf{v}^\intercal e^{\mathbf{M}t} \mathbf{v}} dt}{L}, $$ which is a more difficult one.
Can anyone shed some light on this?
Thanks in advance!
The question is to integrate $\|e^{At} v\| = \sqrt{v^T e^{A^T t} e^{A t} v}$. If $A$ has eigenvalues $\lambda_j$ for eigenvectors $u_j$ and $v = \sum_j c_j u_j$, then $e^{A t} v = \sum_j e^{\lambda_j t} c_j u_j$, and $$\|e^{At} v\| = \sqrt{ \sum_{j,k} e^{(\lambda_j + \lambda_k) t} c_j c_k u_j^T u_k}$$ Even for the case of two eigenvalues, this won't have a closed form integral in general.
As for numerical methods, I would just use whatever is standard in the software of your choice (e.g. Maple, Matlab, Mathematica), unless you run into difficulties.