1
$\begingroup$

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:

  1. Does seperation of variables really give a general solution to differential equations, or are there exceptions?
  2. If the answer to question 1 is no: How can we be sure that a solution is general?
  3. If the answer to question 1 is yes: How is $\pm 1$ obtained from the given solution?

Answer would be gladly appreciated!

$\endgroup$
2
  • $\begingroup$ This may be of help: math.stackexchange.com/questions/980676/… $\endgroup$ Nov 23, 2016 at 11:33
  • 1
    $\begingroup$ Going from the first equation to the second, you implictly ruled out $y^2=1$, so there is no doubt why these solutions were lost. $\endgroup$
    – user65203
    Nov 23, 2016 at 14:06

4 Answers 4

2
$\begingroup$

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$.

$\endgroup$
3
  • $\begingroup$ Makes a lot of sense! I'll be more careful dividing! Thank you very much! $\endgroup$
    – Max
    Nov 23, 2016 at 16:58
  • $\begingroup$ This actually occurs a lot in DEs but doesn't always affect the answer. For example solving $y=y'$ (to get $y=ce^x$) involves dividing by $y$ so technically you really should consider $y=0$ as a second case but luckily (unfortunately) it comes out as a possible solution ($c=0$) when you do the calculations and divide by $y$. $\endgroup$
    – Ian Miller
    Nov 24, 2016 at 0:30
  • $\begingroup$ +Ian Miller Yeah, it's kind of dangerous, because you can start getting comfortable without realizing that you're doing it wrong, and then all of a sudden it affects the answer (such in this case). Even using integrating factor can involve a division, which I have never considered before, so even then you have to look at the cases where the function in front of $y'$ is equal to $0$ to see if there are additional functions which are the same as the solution, with the exception that it's defined for the previously-undefined values as well. $\endgroup$
    – Max
    Nov 24, 2016 at 12:38
1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ I'm assuming that this is the same concept as in JJacqelin's answer, but with another approach? What makes me confused though, is that since you're multiplying the numerator/denominator by $(1-y_0)$, aren't you assuming that $y_0$ isn't $1$? EDIT: Oh wait, you just said that it's a removable singularity! I think I get it :) $\endgroup$
    – Max
    Nov 23, 2016 at 17:10
  • $\begingroup$ The computation is for $y_0\ne\pm 1$ to avoid dividing by zero, the resulting formula is also valid for these values. And only needs one constant which conveniently enough is also the initial value. But yes, the general idea is the same. $\endgroup$ Nov 23, 2016 at 17:14
  • $\begingroup$ +LutzL Alright, I understand! Thanks for clarifying! $\endgroup$
    – Max
    Nov 23, 2016 at 17:45
1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ This is really interesting... I'm guessing that I assumed that my $c_2$ is equal to your $\frac{C_2}{C_1}$? If so, I just assumed that $C_1 \not = 0$, which doesn't have to be true... Which kind of bothers me, since I've always assumed that it shouldn't matter when moving the constant to the other side (which it does now, since the LHS has a natural logarithm in it). Does this mean that you have to watch out, not making simplifications like that, in case of division by 0? $\endgroup$
    – Max
    Nov 23, 2016 at 17:02
  • $\begingroup$ In fact $C_2=C_1c_3$. My answer is only a trick to give a nicer form to the result. As I said, this doesn't change the key point explained by Ian Miller. Since this was pointed out earlier, I didn't repeat it in my late answer. $\endgroup$
    – JJacquelin
    Nov 23, 2016 at 18:13
0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ The OP mentioned $c_1$ going to infinity which is the same as $c_3$ going to infinity. $\endgroup$
    – Ian Miller
    Nov 23, 2016 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .