The solution of the linear differential equation y'+a y=
g(x) with
is given by
.
Second order linear equation y''+a y'+by= g(x) is often solved by the
method of varying a constant.
The first step is to solve the homogenous equation y''+a y'+by=0 first
using
. The general solution of homogenous equation is
, or
if the characteristic
equation has double root.