Solution of first order linear differential equations via integrating factors. Reference in Stewart: Section 9.5.