5
$\begingroup$

I'm trying to solve the equation y' = 1 - y^2 Here is my attempt: y' = 1 - y^2 Divide by (1-y^2) \frac{y'}{1-y^2} = 1 Integrate both sides: $\frac{1}{2}\log|\frac{y+1}{y-1}|=t+c$ Rearrange $y = \frac{ke^{2t}+1}{ke^{2t}-1}$ I'd have thought that solution was right, but we have to figure out a specific solution with y(0) = 0. But this isn't possible with the above equation.

  • 1
    (Cont.) From the integrated expression it follows that $\left| \frac{y+1}{y-1} \right| = \exp 2(t+c)$, hence $\frac{y+1}{y-1} = \pm e^{2c} e^{2t}$. Now let $k = \pm e^{2c}$; then $k$ can be anything except zero. By letting $k$ run through the nonzero real numbers, you get all the real-valued solutions $y(t)$, except the constant ones $y(t)=1$ and $y(t)=-1$ which should have been noted separately before dividing by $1-y^2$.2011-05-19

3 Answers 3

1

Since you want a solution near $y=0$, you should use $1-y$ in the denominator (as it will be positive) and can remove the absolute value signs. This changes some signs in your answer, giving $y = \frac{ke^{2t}-1}{ke^{2t}+1}$ and $k=1$ gives $y(0)=0$

  • 0
    See Hans's comment above. There's no need for complex valued integration constants here as long as you don't ignore the absolute value.2011-05-19
1

Reducing from what you have a little more, we get that equal to Tanh[x-k].

Tanh[-k] == 0 //Seting x to zero

Therefore k = 0, leaving Tanh[x] as your function.

  • 0
    Exactly, this is the right compact form of the solution. tanh is sinh/cosh so its derivative is $(\cosh^2 t - \sinh^2 t)/\cosh^2 t = 1/\cosh^2 t$ which is equal to $1-\tanh^2 t$, indeed.2011-05-19
0

I wrote it down and solved it in a slightly different way. The first thing you should notice is that $y = 1$ and $y = -1$ are the two constant solutions, which allows you then to divide y' by $1-y^2$, since you want to study it for $y(0) \in (-1,1)$, knowing that any solution starting in $(-1,1)$ stays there (or dies in 1).

Then yes, with some algebra you manage to get

\left(\log \frac{1+y}{1-y}\right)' = 2

if I haven't screwed up with the signs; now integrating it from 0 to $t$ you get:

$\log \frac{1+y(t)}{1-y(t)} - \log \frac{1+y(0)}{1-y(0)} = 2t$

without the absolute value since everything in the argument of the logs is non-negative. By imposing $y(0) = 0$ the second term in the left vanishes and you're left with an easy expression that if inverted gives the following:

$y(t) = \frac{e^{2t} - 1}{e^{2t} + 1}$

which is simply

$y(t) = \tanh (t)$

and of course double checking $y(0) = 0$.