How can i convert nonhomogeneous ode to homogeneous ? I have an equation system
$$y'(t) = M(t)y(t)+h(t)$$ 
where $[M(t)]_{2\times2}$ square matrix  and  $[h(t)]_{2 \times1}$ is the nonhomogeneous part of the system. I can solve numerically homogeneous systems as $y'(t)=M(t)y(t)$ with my algorithm which is in my topic(Is it true for solving differential equations by getting constant coefficient matrix with magnus expansion) but for nonhomogeneous one I am not sure how can i do it. 
In this paper (http://personales.upv.es/serblaza/2012APNUMdoi.pdf) equation(17-18), I found  some useful informations about numerical solutions of nonhomogeneous systems but, i'm still suspicious solving nonhomogeneous systems with my algorithm.
Is there any way converting nonhomogeneous systems to homogeneous systems for solving numerically as above type equations ? 
 A: You can transform the system into a homogeneous one by adding an additional constant component $y_{n+1}\equiv 1$ so that 
$$
\pmatrix{\dot y_{1:n}(t)\\\dot y_{n+1}(t)}
=
\pmatrix{M(t)&h(t)\\0&0}
\pmatrix{y_{1:n}(t)\\y_{n+1}(t)}
$$
with $y_{n+1}(t_0)=1$.
A: Find an annihilator, I.e., an operator which reduces the RHS to zero. For example, if your ODE has a polynomial of degree $d$ as forcing function, you differentiate $d$ times, a term of the form $\mathrm{e}^{\alpha t}$ makes you apply $\mathrm{D} -\alpha$, I.e., differentiate the equation and subtract it multiplied by $\alpha$.
A: To convert the non-homogeneous differential equation to a homogeneous differential equation, simply remove the "non-homogeneous part"!  That is, to convert the non-homogeneous differential equation y'(t)= M(t)y(t)+ h(t) just write it as y'(t)= M(t)y(t).
After finding the general solution to that equation, you can get the general solution to the original equation by adding any single solution to the entire equation.  
To give a simple one-dimensional example, suppose the problem is to find the general solution to y'(t)= 2y(t)+ 4t.  The associated homogeneous equation is y'(t)= 2y(t) which we can write as dy/y= dt/2 and, integrating, ln(y)= ln(t)/2+ C which is equivalent to $y(t)= C't^{1/2}$.  To find a single solution to the entire equation since the 'non-homogeneous' part is linear, we try a linear solution, y(t)= at+ b, y'(t)= a, so the equation becomes $a= 2(at+b)+ 4t$.  That is the same as $-2at+ (a+ 2b)= 4t$ so we have -2a= 4, a+ 2b= 0.  From -2a= 4, a= -2.  Then a+ 2b= -2+ 2b= 0 gives b= 1.  
The general solution to the original equation, y'(t)= 2y(t)+ 4t, is $y(t)= C't^{1/2}- 2t+ 1$.
