
This is a first order linear differential equation of the form

The integrating factor (I.F) of this differential equation is,


Hence, the solution of the differential equation is,



Thus, the solution of the given differential equation is \(y = \frac{x+1}{(x-1)^2}(x^2-6x+8\,log|x+1|+c)\)