Rewrite the given differential equation as
follows :
$ \frac{dy}{dx} + \frac{2x}{x^{2} -1} y = \frac{1}{x^{2} -1}$ which is a linear form
The integrating factor I.F.
$ = e^{\int \frac{2x}{x^{2}-1} dx} = e^{\ell n\left(x^2 -1\right)} = x^{2} - 1 $
Thus multiplying the given equation by $ \left(x^{2} - 1\right) $
we get $\left(x^{2 } -1\right) \frac{dy}{dx} + 2xy = 1 $
$ \Rightarrow \frac{d}{dx} \left[y\left(x^{2} -1\right)\right] = 1 $
On integrating we get $y\left(x^{2} -1\right) =x +c $