# Very simple ODE

1. Nov 26, 2013

### TheFerruccio

1. The problem statement, all variables and given/known data
$y'=1-y^2$

2. Relevant equations

I've tried a few methods, including change of variables, separability. I'm pretty sure it's separable.

3. The attempt at a solution

If I use separation of variables, I end up with

$\frac{\text{dy}}{1-y^2}=\text{dx}$

This integral evades me. There must be another trick that I am missing.

2. Nov 26, 2013

### pasmith

Partial fraction decomposition

3. Nov 26, 2013

### TheFerruccio

It appears that the integral of $\frac{\text{dy}}{1-y^2}$ is $\tanh ^{-1}(y)$.

This would make the solution $y=\frac{e^{2 c_1}+e^{2 x}}{e^{2 x}-e^{2 c_1}}$

4. Nov 26, 2013

### TheFerruccio

That's a good idea! I tried partial fraction decomposition, and I ended up with

$0.5 (c+\log (1-y)+\log (y+1))=c+x$
$\log (c (1-y) (y+1))=2 c+2 x$
$c (1-y) (y+1)=e^{2 c+2 x}$
From here, it looks like it gets into a hairy quadratic formula with solutions of the form
$y=\pm \sqrt{-e^{2 c+2 x}-1}$

If I just recognized the solution was a form of hyberbolic inverse tangent, it would have been much easier, though, I do not see how I would have seen that without guessing. I did not have that in my memory.

5. Nov 26, 2013

### haruspex

You don't need to put a constant of integration both sides (and certainly not the same one!).
You have a sign error in the integration. You should end up with a ratio of the y terms, not the product.

6. Nov 26, 2013

### TheFerruccio

I do not see where the mixup is. If I expand the term into partial fractions, I end up with...
$\frac{1}{1-y^2}\to \frac{1}{(1-y) (y+1)}\to \frac{A}{y+1}+\frac{B}{1-y}\to \frac{A (1-y)+B (y+1)}{(1-y) (y+1)}\to A+B=1, B-A=0\to A=B=0.5$

If that's the case for A and B, then I simply move on to... Aaaaand I see what I did. Integrating the $\frac{0.5}{y+1}+\frac{0.5}{1-y}$ results in a difference instead of a sum. However, I am even more baffled as to how to isolate y algebraically in this case, since I end up with...

$e^{2 c+2 x}=\frac{y+1}{1-y}$

7. Nov 26, 2013

### haruspex

It's quite easy - you're probably overthinking it
Multiply out and collect up the y terms.