EDIT: I added the original problem.
Solve $(x^2-1)y'+2xy=xy^2$, $y(0)=1$.
Using separation of variables I got $\int \frac{1}{y^2\cdot 2y} dy = \int \frac{x}{x^2-1} dx$.
Integrating both sides (partial fraction for the left side), I ended up at this point:
$\ln\big(|\frac{y-2}{y}|\big)=\ln\big(|x^2-1|\big)+C$ $\;$ ($C$ is a constant)
Do I have to make a distinction of cases at this point? So I get $y \ge 2$ and $ x\in [-\infty; -1] \cup [1; \infty]$ ?
Then, by "ignoring" the absolute, I proceed:
$y-2 = y\cdot x^2\cdot e^C - y\cdot e^C$
$y = \frac{2}{-e^C \cdot x^2 + e^C +1}$
with initial value $y(0)=1$ in the end I have:
$y(x) = \frac{2}{-x^2+2}$
in this case $y(x) \ge 2$ (as it should be?) and $y(x)$ is only defined for $ x\in [-\infty; -1] \cup [1; \infty]$\ $\pm \sqrt{2}$, right?
The given ODE can be rewritten as $$y'={x(2y-y^2)\over1-x^2}\ .$$ This shows that everything is fine at the initial point $(0,1)$, hence there is exactly one solution, and no "cases" should arise. After separation we have $${1\over 2y-y^2}dy={x\over 1-x^2}dx\ .$$ The well known recipe then says that the solution of the given IVP is given by the formula $$\int_1^\eta{2\over 2y-y^2}\>dy=\int_0^\xi {2x\over1-x^2}\>dx\ ,\tag{1}$$whereby we have to compute the two integrals separately and then must solve for $\eta$ (near $1$) as a function of $\xi$ (near $0$).
A primitive of $${2\over 2y-y^2}={1\over 2-y}+{1\over y}$$ valid in the neighborhood of $y=1$ is $$-\log(2-y)+\log y=\log{y\over 2-y}\ .$$ The LHS of $(1)$ therefore computes to $\log{\eta\over 2-\eta}$. Similarly a primitive of ${2x\over 1-x^2}$ valid in the neighborhood of $x=0$ is $-\log(1-x^2)=\log{1\over 1-x^2}$. The RHS of $(1)$ therefore computes to $\log{1\over 1-\xi^2}$.
In this way we obtain the equation $$\log{\eta\over 2-\eta}=\log{1\over 1-\xi^2}\ ,$$ which we now have to solve for $\eta$ as a function of $\xi$. The result is $$\eta={2\over 2-\xi^2}\qquad\bigl(|\xi|<\sqrt{2}\bigr)\ .$$ It turns out that the singularity of the ODE at $x=\pm1$ has no bad effect on this particular solution.