Internal problem ID [953]
Internal file name [OUTPUT/953_Sunday_June_05_2022_01_55_05_AM_25158409/index.tex
]
Book: Elementary differential equations with boundary value problems. William F. Trench.
Brooks/Cole 2001
Section: Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number: 27.
ODE order: 1.
ODE degree: 1.
The type(s) of ODE detected by this program : "quadrature"
Maple gives the following as the ode type
[_quadrature]
\[ \boxed {y^{\prime }-a y+b y^{2}=0} \] With initial conditions \begin {align*} [y \left (0\right ) = \operatorname {y0}] \end {align*}
This is non linear first order ODE. In canonical form it is written as \begin {align*} y^{\prime } &= f(x,y)\\ &= -b \,y^{2}+a y \end {align*}
The \(y\) domain of \(f(x,y)\) when \(x=0\) is \[ \{-\infty <y <\infty \} \] But the point \(y_0 = \operatorname {y0}\) is not inside this domain. Hence existence and uniqueness theorem does not apply. There could be infinite number of solutions, or one solution or no solution at all.
Integrating both sides gives \begin {align*} \int \frac {1}{-b \,y^{2}+a y}d y &= \int {dx}\\ \frac {\ln \left (y \right )-\ln \left (b y -a \right )}{a}&= x +c_{1} \end {align*}
Initial conditions are used to solve for \(c_{1}\). Substituting \(x=0\) and \(y=\operatorname {y0}\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} \frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} = c_{1} \end {align*}
The solutions are \begin {align*} c_{1} = \frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} \end {align*}
Trying the constant \begin {align*} c_{1} = \frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} \end {align*}
Substituting \(c_{1}\) found above in the general solution gives \begin {align*} \frac {\ln \left (y \right )-\ln \left (b y -a \right )}{a} = x +\frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} \end {align*}
The constant \(c_{1} = \frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a}\) gives valid solution.
Summary
The solution(s) found are the following \begin{align*} \tag{1} \frac {\ln \left (y\right )-\ln \left (b y-a \right )}{a} &= x +\frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} \\ \end{align*}
Verification of solutions
\[ \frac {\ln \left (y\right )-\ln \left (b y-a \right )}{a} = x +\frac {\ln \left (\operatorname {y0} \right )-\ln \left (b \operatorname {y0} -a \right )}{a} \] Verified OK.
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }-a y+b y^{2}=0, y \left (0\right )=\mathit {y0} \right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=a y-b y^{2} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{a y-b y^{2}}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{a y-b y^{2}}d x =\int 1d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\ln \left (y\right )}{a}-\frac {\ln \left (b y-a \right )}{a}=x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {{\mathrm e}^{c_{1} a +x a} a}{-1+b \,{\mathrm e}^{c_{1} a +x a}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=\mathit {y0} \\ {} & {} & \mathit {y0} =\frac {{\mathrm e}^{c_{1} a} a}{-1+b \,{\mathrm e}^{c_{1} a}} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\frac {\ln \left (-\frac {\mathit {y0}}{-b \mathit {y0} +a}\right )}{a} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\frac {\ln \left (-\frac {\mathit {y0}}{-b \mathit {y0} +a}\right )}{a}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\frac {a \,{\mathrm e}^{x a} \mathit {y0}}{b \mathit {y0} \,{\mathrm e}^{x a}-b \mathit {y0} +a} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\frac {a \,{\mathrm e}^{x a} \mathit {y0}}{b \mathit {y0} \,{\mathrm e}^{x a}-b \mathit {y0} +a} \end {array} \]
Maple trace
`Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear trying Bernoulli <- Bernoulli successful`
✓ Solution by Maple
Time used: 0.032 (sec). Leaf size: 25
dsolve([diff(y(x),x)=a*y(x)-b*y(x)^2,y(0) = y0],y(x), singsol=all)
\[ y \left (x \right ) = \frac {a \operatorname {y0}}{\left (-\operatorname {y0} b +a \right ) {\mathrm e}^{-a x}+\operatorname {y0} b} \]
✓ Solution by Mathematica
Time used: 0.854 (sec). Leaf size: 27
DSolve[{y'[x]==a*y[x]-b*y[x]^2,y[0]==y0},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {a \text {y0} e^{a x}}{b \text {y0} \left (e^{a x}-1\right )+a} \]