TITLE: What is the solution to linear ODE $\dot x = Ax + b$?
QUESTION [6 upvotes]: Suppose I have a system of linear ODE
$$\dot x = Ax + b$$ where $A \in \mathbb{R}^{n \times n}, b \in \mathbb{R}^n$
I know that when $b = 0$, using Laplace transform we have $x(s) = (sI-A)^{-1} x(0)$, which upon inverting (pg.13) we obtain $x(t) = e^{At}x(0)$
However, when $b$ is non-zero, the Laplace transform gives
$$x(s)  = (sI-A)^{-1}x(0) + (sI-A)^{-1}\dfrac{b}{s}$$
I have no idea how to invert $(sI-A)^{-1}\dfrac{b}{s}$
Does anyone know how to solve for this?
Some thoughts,
$(sI-A)^{-1}\dfrac{b}{s} = (sI-A)^{-1}(sI)^{-1}b = ((sI)(sI-A))^{-1}b = (s^2I - sA)^{-1}b$

REPLY [3 votes]: The convolution integral in amd's answer should work as well, but I would just like to add two other methods of solving for $x(t)$.
The first method uses a coordinate transformation $z = x + a$, with $a\in\mathbb{R}^n$ similar to $b$ a constant vector. Differentiation the new coordinates gives
\begin{align}
\dot{z} &= \dot{x}, \\
&= A\,x + b, \\
&= A\,(z - a) + b.
\end{align}
If one can solve $A\,a=b$ for $a$ then $z=0$ would be an equilibrium point of $z$ and would have the solution $z(t) = e^{A\,t}\,z(0)$. And from the definition of $z$ it follows that 
$$
x(t) = e^{A\,t}\,(x(0) + a) - a.
$$
It can be noted that $A\,a=b$ can always be solved for $a$ if $A$ has full rank ($\det(A)\neq0$).
The other option that would always work is to extend the state space by one and set its initial condition to one $w = \begin{bmatrix}x^\top & 1\end{bmatrix}^\top$. Namely the differential equation $x$ is equivalent to 
$$
\dot{w} = \begin{bmatrix}A & b \\ 0 & 0\end{bmatrix} w.
$$
So the solution for $x(t)$ can also be found with
$$
x(t) = \begin{bmatrix}I & 0\end{bmatrix} e^{\begin{bmatrix}A & b \\ 0 & 0\end{bmatrix}t} \begin{bmatrix}x(0) \\ 1\end{bmatrix}.
$$