<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] Note that $$e^{-x^2+2\ln |x|+c}+x^2=e^{-x^2+c}e^{2\ln|x|}+x^2=e^{-x^2+c}e^{\ln x^2}+x^2=x^2(e^{-x^2+c}+1)$$
So your answer is the same, just in a different form.
</s>