I'll assume the ODE is

Solve the homogeneous ODE,

The characteristic equation

has roots at
and
. Then the characteristic solution is

For nonhomogeneous ODE (1),

consider the ansatz particular solution

Substituting this into (1) gives

For the nonhomogeneous ODE (2),

take the ansatz

Substitute (2) into the ODE to get

Lastly, for the nonhomogeneous ODE (3)

take the ansatz

and solve for
.

Then the general solution to the ODE is
