Methods for solving x'=Ax+b for sparse, singular A
I am in the process of building a robotics physics engine. I have been using the Linear ODE $x' = Ax + b$ for the core of my physics integration, but have never found a really good solution method for it.
My problem gets harder than the standard ODE solution because my A matrix is singular.
Here is an example of an $A$ matrix and a $b$ matrix from my simulation:
$$ \begin{vmatrix} 0 & 0 & 0.64 & 0 & 0.64 & 1.27 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & -0.64 & 1.27 & 0 & 0 & 0 & 0.64 \ 0 & 0 & -29.53 & 0 & -28.2 & -56.4 & 0 & 0 & 0 & 0 \ 0 & 0 & 1.33 & -2.67 & 0 & 0 & 0 & 0 & 171.2 & -1.33 \ 0 & 0 & 1.33 & 0 & 0 & 0 & 0 & 0 & 0 & -1.33 \ 0 & 0 & 2.67 & 0 & 0 & 0 & 0 & 0 & 0 & 2.67 \ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 28.2 & -56.4 & 0 & 0 & 0 & -29.53 \ \end{vmatrix} $$
$$ \begin{vmatrix} 0\ 0\ 9.76\ 0\ 171.2\ 0\ 0\ 0\ 0\ -9.76\ \end{vmatrix} $$
According to several previous questions, the solution to this ODE is the expression. $$ x(t)=e^{At}y+\int_0^t e^{As}b ds $$
In particular, the integral of this is the hard part. According to Wolfram Alpha, the solution is:
$$ \int_0^t e^{As}b ds = \frac{b(e^{At}-1)}A $$
Which is equivelant to the taylor series:
$$ bt + \frac{1}2Abt^2 + \frac{1}6A^2bt^3 + \frac{1}{120}A^4bt^5 + ... 563
$$
My current, inefficient solution relies on evaluating this taylor series. I cannot evaluate the solution directly, since I cannot invert A. I have tried using $A^+$, however this does not yield the correct solution.
Is there a better solution to this problem? I am currently taking Calc II, and have attempted to teach myself the Linear Algebra necessary to build this software. Therefore I don't know of all the tricks that might be used to tame this problem.
I am using the theano python library to perform these calculations, though if I can get a solution using scipy/numpy I can figure out how to do it in theano. 563