General integral of a differential equation I have this equation: $x^2y'+y^2-1=0$. It's an equation with separable variable. When I calculate the solution do I have to consider  the absolute value for the argument of the log?
$$\frac1{1-y^2}$$ is defined for all $y\ne\pm1$ and its antiderivative can be expressed as

$$\frac12(\log|y+1|-\log|y-1|)=\log\sqrt{\left|\frac{y+1}{y-1}\right|}.$$

Depending on the range of $y$, this function is one of $\text{artanh(y)}$ or $\text{arcoth(y)}$. Hence the solution to the ODE is one of

$$y=\tanh\left(C-\frac1x\right),\\
y=\coth\left(C-\frac1x\right)=\dfrac1{\tanh\left(C-\dfrac1x\right)}.$$

Notice that due to the singularities, the solution is not allowed to cross the values $y=\pm1$.

Also, these solutions are not defined at $x=0$. But then the original equation degenerates to $y=\pm1$ and the solution has a jump there. The cotangent solution is also undefined at $Cx=1$.
Sorry I meant to write $\tanh^{-1}(y)$ in my comment, so the answer can be found as follows,

$$\frac{dy}{1-y^2} = \frac{dx}{x^2}\\
\implies\tanh^{-1}(y) = -\frac{1}{x} + c\\
\implies y = \tanh(c-\frac{1}{x})$$