If the characteristic equation for a differential equation can be written as $(s-r_1)(s-r_2)$, the substition $z=y'-r_1y$ yields an equation of the form $z'-r_2z=f(x)$.
For example, if our equation is
$y''-3y'+2y=e^x$,
the substitution
$z=y'-2y$
simplifies to
$y''-2y'-(y'-2y)=z'-z=e^x$
At this point, integrating factors can be used to solve for $z$, then substituting back will yield a solution for $y$. My first question is why does it work like this?
My second question is if there's a way to find a substitution for a general second order linear ODE
$y''+p(x)y'+q(x)y=f(x)$
that will similarly reduce the problem to a first order linear ODE which can then be solved by integrating factors?