<s>[INST] $(x^2+1)(y^2-1)dx+xydy=0$ 
Solve $(x^2+1)(y^2-1) \, dx+xy \, dy=0$

My solution :
$$\begin{align}
\frac{x^2+1}{-x} \, dx &= \frac{-y}{y^2-1} \, dy \\
\left(-x-\frac{1}{x}\right) \, dx &= -\frac{1}{2}\frac{2y}{y^2-1} \, dy \\
\int \left(-x-\frac{1}{x}\right) \, dx &= -\frac{1}{2} \int \frac{2y}{y^2-1} \, dy \\
\frac{x^2}{2}+\ln|x| &= \frac{1}{2}\ln|y^2-1| \\
y^2 &= e^{x^2+2\ln|x|}+1 \\
y &= \pm\sqrt{e^{x^2+2\ln|x|}+1}
\end{align}$$
I got these solutions using ode calculator, and I don't get why it is correct and where am I wrong?
$$y = \pm \frac{\sqrt{e^{-x^2+c_1}+x^2}}x$$
Help please.
Thanks !
 [/INST] In your calculations you missed a sign and forget to add the constant when integrating.
You should have got $$\pm \sqrt{e^{-x^2-2\log|x|+c}+1}$$
Then you can transform this into the calculator answer like this:
\begin{align}
\pm \sqrt{e^{-x^2-2\log|x|+c}+1} 
& = \pm \sqrt{e^{-x^2-\log(x^2)+c}+1}\\
& = \pm \sqrt{e^{-x^2+c}x^{-2}+1}\\
& = \pm \frac{\sqrt{e^{-x^2+c}+x^2}}{x}
\end{align}
</s>