linear equations of order one

1. (x^2-1)dy/dx+2y=(x+1)^2

(x^2-1)y'+2y=(x+1)^2

y' + 2/(x^2-1) y = (x+1)/(x-1)

now use the integrating factor of

e^(∫(x+1)/(x-1) dx)

and things get simpler.