<s>[INST] Solving a separable differential equation Solve the differential equation:
$$y'=\frac{1-y^2}{1-x^2}$$
My book says the solution is: $$y=\frac{x+c}{cx+1},$$ where $c$ is a constant.
It's been ten minutes I tried to verify if it was correct but I'm pretty sure the book is wrong. Can someone confirm it?
 [/INST] \begin{align*}
\text{Separate:} && \frac{dy}{1-y^2} & =\frac{dx}{1-x^2} \\
\text{Partial fractions:} && \frac{1}{2}\left(\int\frac{1}{1+y}dy+\int\frac{1}{1-y}dy\right) & =\frac{1}{2}\left(\int\frac{1}{1+x}dx+\int\frac{1}{1-x}dx\right) \\
\text{Integrate:} && \log\frac{1+y}{1-y} & = \log c+\log\left(\frac{1+x}{1-x}\right) \\
\text{Solve for $y$:} && y & =\frac{c+cx-1+x}{c+cx+1-x} \\
\text{Factor:} && y & =\frac{x(c+1)+c-1}{x(c-1)+c+1} \\
\text{Divide by $c+1$:} && y & =\frac{x+\frac{c-1}{c+1}}{\frac{c-1}{c+1}x+1} \\
\text{Let $k=\frac{c-1}{c+1}$:} && y & =\frac{x+k}{kx+1}.
\end{align*}
</s>