Determining $y' = 1 - y^2$ generally excludes $y = \pm 1$ So I tried solving the differential equation $y' = 1 - y^2$. From the equation itself, it's clear that $y = \pm 1$ is a solution, since that yields $0$ on the RHS, which makes the derivative $0$ and the function constantly equal to $\pm 1$. I then tried solving it by seperating variables, and did so in this way:
$$y' = 1 - y^2$$
$$\int{\frac{dy}{1-y^2}} = \int{dx}$$
$$\int{\left(\frac{1}{2(1+y)} +\frac{1}{2(1-y)}\right)dy} = \int{dx}$$
$$\frac{|1+y|}{|1-y|} = e^{2x}e^{c_1} = c_2e^{2x}$$
Depending on the value of $y$, you can define $c_3 = \pm c_2$ (in such a way that if $\frac{1+y}{1-y}$ is negative, $c_3 = -c_2$, and for the opposite case, $c_3 = c_2$). Here we assume that the fraction doesn't change sign, which it later can be proved not to. Therefore, we rewrite the equality as:
$$\frac{1+y}{1-y} = c_3e^{2x}$$
Simplifying this gives:
$$y = \frac{c_3e^{2x} - 1}{c_3e^{2x} + 1}$$
Since $y \in [-1, 1]$, $c_3 = c_2$. So from my understanding, seperating variables should give the general solution to the differential equation. As can be seen, letting $c_3 = 0$ gives the solution $y = -1$, but what about $y = 1$? I also realized that since $c_3 = e^{c_1}$, we're limited to even more things - we cannot choose $c_1$ such that $c_3$ is $0$, and neither such that $y$ becomes $1$. It is, however, clear that:
$$\lim_{c_1 \to - \infty}y = -1$$
$$\lim_{c_1 \to \infty}y = 1$$
Although since these are limits and not real values, I'm guessing that they cannot be choosen. So from this, my questions are:


*

*Does seperation of variables really give a general solution to differential equations, or are there exceptions?

*If the answer to question 1 is no: How can we be sure that a solution is general? 

*If the answer to question 1 is yes: How is $\pm 1$ obtained from the given solution?


Answer would be gladly appreciated!
 A: Your very first step was to divide by $1-y^2$. This is only valid if $1-y^2\neq0$. This is why you can not get those other solutions without taking limits.
As for how to get those solutions you should consider both cases: $1-y^2\neq0$ and $1-y^2=0$. The first gives your solution. The second gives $y=\pm1$.
A: You could use the initial condition at $x=0$ to set $c_3=\frac{1+y_0}{1-y_0}$ to get
$$
y=\frac{(1+y_0)e^{2x}-(1-y_0)}{(1+y_0)e^{2x}+(1-y_0)}=\frac{y_0+\tanh(x)}{1+y_0\tanh(x)}
$$
which allows all values $y_0\in\Bbb R$ as initial conditions, as the removable singularity at $y_0=1$ was cancelled in the fraction.
A: Starting from this point in the original question :
$$\int{\left(\frac{1}{2(1+y)} +\frac{1}{2(1-y)}\right)dy} = \int{dx}$$
We are allowed to take not only one constant, but two which leads to :
$$C_1\frac{1+y}{1-y} = C_2e^{2x} \quad \text{instead of}\quad \frac{1+y}{1-y} = c_3e^{2x}$$
$$y=\frac{C_2e^x-C_1e^{-x}}{C_2e^x+C_1e^{-x}}$$
It is no longer necessary to consider some limits, but more simply :
$$\begin{cases} y=1 \quad \text{if}\quad C_1=0 \\y=-1 \quad \text{if}\quad C_2=0 \end{cases}$$  
Of course, this trick doesn't negate the necessity to separate the cases $y=\pm 1$ from the case $y\neq\pm 1$ at the beginning of solving. But it makes easier to extend the solution on the whole range at the end.
A: What Ian Miller said is the best answer, but I'll add that if you let your $c_3$ go to infinity, you get $y=1$.  I don't think you could always depend on this being the case, but it works here.
