Solving a differential equation analytically

1.2k Views Asked by At

I have the question to solve $\frac{dy}{dx}=1-y^2$ analytically, I'm looking at last year's example where the question is to solve $\frac{dy}{dx}=y-y^2$ and they've done this:

Solving the equation will require the following formula $$\int_{y_0}^y\frac{dz}{z(1-z)}=\int_{x_0}^xds=x-x_0$$ provided that $y,y_0\ne0,y,y_0\ne1$. Hence $$\ln\left|\frac y{y_0}\right|-\ln\left|\frac{y-1}{y_0-1}\right|=x-x_0.$$ Noticing that (a) solutions of autonomous equations with continuous RHSs are monotone, and (b) the RHS is differentiable, we can conclude that solutions of the initial value problem above are always sandwiched between two equilibrium solutions $y(x)=0$ and $y(x)=1$. In this case the above equality becomes $$\ln\frac y{y_0}-\ln\frac{y-1}{y_0-1}=x-x_0,$$ or alternatively $$\ln\frac y{y-1}=x-x_0+\ln\frac{y_0}{y_0-1}.$$ Therefore $$\frac y{y-1}=e^{x-x_0}\frac{y_0}{y_0-1}\implies y(x)=\left(1+e^{-(x-x_0)}\frac{1-y_0}{y_0}\right)^{-1}$$ is the solution of the initial value problem.

I follow it all up until the last line, specifically the part where they change it to $$y(x)=\left(1+e^{-(x-x_0)}\frac{1-y_0}{y_0}\right)^{-1}$$ All help would be appreciated.

2

There are 2 best solutions below

0
On

Clarification of the last step:

\begin{align} & \dfrac{y}{y - 1} = e^{x - x_0}\dfrac{y_0}{y_0 - 1} \\ \implies & \dfrac{1}{\dfrac{y}{y - 1}} = \dfrac{1}{e^{x - x_0}\dfrac{y_0}{y_0 - 1}} \\ \implies & \dfrac{y - 1}{y} = e^{-(x - x_0)} \dfrac{y_0 - 1}{y_0} \\ \implies & 1 - \dfrac{1}{y} = e^{-(x - x_0)} \dfrac{y_0 - 1}{y_0} \\ \implies & 1 - e^{-(x - x_0)} \dfrac{y_0 - 1}{y_0} = \dfrac{1}{y} \\ \implies & \dfrac{1}{y} = 1 + e^{-(x - x_0)} \dfrac{1 - y_0}{y_0} \\ \implies & y = \left( 1 + e^{-(x - x_0)} \dfrac{1 - y_0}{y_0} \right)^{-1} \end{align}

0
On

\begin{align} \frac y {y-1} & = A \\[10pt] y & = A(y-1) = Ay -A \\[10pt] y - Ay & = -A \\[10pt] y(1-A) & = -A \\[10pt] y & = \frac A {A-1} \end{align} So this function is its own inverse, or in other words it is an involution.

Thus you have $$ y = \frac{e^{x-x_0}\frac{y_0}{y_0-1}}{e^{x-x_0}\frac{y_0}{y_0-1} - 1} = \frac{e^{x-x_0} y_0 }{e^{x-x_0} y_0 - (y_0-1) } = \frac{y_0}{y_0 - (y_0-1)e^{-(x-x_0)} } $$ Divide both the numerator and the denominator by $y_0$ and you've got it.