<s>[INST] Integration problem. Two different answers. 
The variables x and y are related by the differential equation
$$x \frac {dy}{dx} = 1 − y^2$$.
When x = 2, y = 0. Solve the differential equation, obtaining an expression for y in terms of x.

I reached the point where
$$\frac12\int\frac1{1-y}+\frac1{1+y}dy=ln|x|+C$$
(after rearranging and doing partial fractions)
now I have a problem integrating the term $\frac1{1-y}$. There are 2 ways:
answers' way: $-\frac{-1}{1-y}$ yielding $-ln|1-y|$
my way: $-\frac1{y-1}$ yielding $-ln|y-1|$
I think both should be correct since $y-1$ is the same function as $1-y$ BELOW THE MODULUS SIGN. Later when I have to get rid of the mod sign I get a different answer than that in the answers. I mean:
answers' final answer: $y=\frac{x^2-4}{x^2+4}$
my final answer: $y=\frac{x^2+4}{x^2-4}$
 [/INST] We have $$2C+2\ln|x|=\int\frac{dy}{y+1}-\int\frac{dy}{y-1}$$
$$2C+2\ln|x|=\ln\left|\frac{y+1}{y-1}\right|$$
$$x=2,y=0\implies 2C+2\ln2=\ln|-1|=0\iff C=-\ln2$$
$$\implies\ln\left|\frac{y+1}{y-1}\right|=2(\ln|x|-\ln2)=\ln\left|\frac{x}2\right|^2$$
Now for real $x,\dfrac{x^2}4\ge0$ and $\dfrac{y+1}{y-1}$ is undefined if $y-1=0$
So, if $\displaystyle\dfrac{y+1}{y-1}\ge0\iff y>1$ or $\displaystyle y\le-1, \dfrac{x^2}4=\dfrac{y+1}{y-1}$
Else (i.e., if $\displaystyle -1\le y<1), \frac{x^2}4=-\frac{y+1}{y-1}=\frac{1+y}{1-y}$
Apply Componendo and dividendo
</s>