let (1) be the non homogeneous second order differential equation.

we have that (2) whereat are the solutions of the homogeneous equation.

we differentiate the equation (3) and we get

by doing this, we would get two particular solutions for (1), but we actually want just one solution, so to get these thing work okay, we put (2); differentiate again to get (4), substitute (4) on (1) to get (5).

now (2) and (5) form the following system of equations:

now we solve it as follows:

integrate to get

(2) writes as

add initial conditions and and the final expression reads