$(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 !
 A: Here I propose a solution with which you can compare:
\begin{align*}
(x^{2} + 1)(y^{2} - 1) + xyy' = 0 & \Longleftrightarrow \frac{x^{2} + 1}{x} + \frac{yy'}{y^{2} - 1} = 0\\\\
& \Longleftrightarrow \frac{x^{2}}{2} + \ln|x| + \frac{1}{2}\ln\left|y^{2} - 1\right| = c_{0}\\\\
& \Longleftrightarrow \ln\left|y^{2} - 1\right| = -x^{2} - \ln(x^{2}) + c_{1}\\\\
& \Longleftrightarrow y^{2} - 1 = \frac{\exp\left(-x^{2} + c_{1}\right)}{x^{2}}\\\\
& \Longleftrightarrow y^{2} = \frac{\exp\left(-x^{2} + c_{1}\right) + x^{2}}{x^{2}}\\\\
& \Longleftrightarrow y(x) = \pm\sqrt{\frac{\exp\left(-x^{2} + c_{1}\right) + x^{2}}{x^{2}}}
\end{align*}
If you still have any questions, please let me know.
Hopefully this helps !
A: 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}
A: 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.
