Solution (source code)

= Solution

Taking the <Laplace transform> of the differential equation and using
$$
\mathcal L\{y'\}(s)=sY(s)-y(0)
$$
gives
$$
sY-y_0=AY+G.
$$
Hence
$$
(sI-A)Y=y_0+G.
$$
Whenever $s$ is not an <eigenvalue> of $A$, the matrix $sI-A$ is invertible, and thus
$$
\boxed{Y(s)=(sI-A)^{-1}(y_0+G(s))}.
$$
This is the <Laplace-transform solution of a constant-coefficient vector ODE>.

Set $g=0$. The given homogeneous solution is $y(t)=e^{tA}y_0$, so the preceding formula says
$$
\mathcal L\{e^{tA}\}(s)y_0=(sI-A)^{-1}y_0
$$
for every initial vector $y_0$. Equality on every vector gives the matrix identity
$$
\boxed{\mathcal L\{e^{tA}\}(s)=(sI-A)^{-1}},
$$
on the common domain of convergence and in particular away from the eigenvalues of $A$. This is the <Laplace transform of a matrix exponential>.