Given :$(x^2-1) \large\frac{dy}{dx}+$$2xy=\large\frac{1}{x^2-1}$
This is the linear differential equation of the form $\large\frac{dy}{dx}$$+Py=Q$
Divide the equation throughout by $(x^2-1)$ we get
$\large\frac{dy}{dx}+\frac{2xy}{(x^2-1)}=\frac{1}{(x^2-1)^2}$
Here $P=\large\frac{2x}{x^2-1}$ and $Q=\large\frac{1}{(x^2-1)^2}$
The solution for $\large\frac{dy}{dx}$$+Py=Q$ is
$y e^{\large\int pdx}$$=\int Qe^{\large\int pdx}+c$
First let us find $\int pdx=I.F$
Here $\int pdx=\int \large\frac{2x}{x^2-1}$$dx$
Put $x^2-1=t$
differentiating with respect to t we get,
$2xdx=dt$
Substituting t and dt we get,
$\int \large\frac{dt}{t}$$ =\log |t|$
Substituting back for t we get,
$\int \large\frac{2x}{x^2-1} $$dx=\log |x^2-1|$
Hence $e^{\large\int pdx}$$=e^{\large\log |x^2-1|}$
But $ e^{\large\log x}=x$
Hence $e^{\large\log|x^2-1|}=x^2-1$
Substituting this in solution we get,
$y(x^2-1)=\int \large\frac{1}{(x^2-1)^2}$$.(x^2-1)dx+c$
$=\int \large\frac{1}{(x^2-1)}$$dx$
This is of the form $ \int \large\frac{dx}{x^2-a^2}=\frac{1}{2a} $$\log \large\frac{|x-a|}{|x+a|}+c$
Here $x=x$ and $a=1$
Therefore $ y(x^2-1)=\large\frac{1}{2}$$\; \log \;\large\frac{|x-1|}{|x+1|}+c$