1.33 problem 34

1.33.1 Existence and uniqueness analysis
1.33.2 Solving as quadrature ode
1.33.3 Maple step by step solution

Internal problem ID [7077]
Internal file name [OUTPUT/6063_Sunday_June_05_2022_04_16_52_PM_44126501/index.tex]

Book: Own collection of miscellaneous problems
Section: section 1.0
Problem number: 34.
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 {p^{\prime }-a p+b p^{2}=0} \] With initial conditions \begin {align*} [p \left (\operatorname {t0} \right ) = \operatorname {p0}] \end {align*}

1.33.1 Existence and uniqueness analysis

This is non linear first order ODE. In canonical form it is written as \begin {align*} p^{\prime } &= f(t,p)\\ &= -b \,p^{2}+a p \end {align*}

The \(p\) domain of \(f(t,p)\) when \(t=\operatorname {t0}\) is \[ \{-\infty

1.33.2 Solving as quadrature ode

Integrating both sides gives \begin {align*} \int \frac {1}{-b \,p^{2}+a p}d p &= \int {dt}\\ \frac {\ln \left (p \right )-\ln \left (b p -a \right )}{a}&= t +c_{1} \end {align*}

Initial conditions are used to solve for \(c_{1}\). Substituting \(t=\operatorname {t0}\) and \(p=\operatorname {p0}\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} \frac {\ln \left (\operatorname {p0} \right )-\ln \left (b \operatorname {p0} -a \right )}{a} = \operatorname {t0} +c_{1} \end {align*}

The solutions are \begin {align*} c_{1} = \frac {-\operatorname {t0} a +\ln \left (\operatorname {p0} \right )-\ln \left (b \operatorname {p0} -a \right )}{a} \end {align*}

Trying the constant \begin {align*} c_{1} = \frac {-\operatorname {t0} a +\ln \left (\operatorname {p0} \right )-\ln \left (b \operatorname {p0} -a \right )}{a} \end {align*}

Substituting \(c_{1}\) found above in the general solution gives \begin {align*} \frac {\ln \left (p \right )-\ln \left (b p -a \right )}{a} = t +\frac {-\operatorname {t0} a +\ln \left (\operatorname {p0} \right )-\ln \left (b \operatorname {p0} -a \right )}{a} \end {align*}

The constant \(c_{1} = \frac {-\operatorname {t0} a +\ln \left (\operatorname {p0} \right )-\ln \left (b \operatorname {p0} -a \right )}{a}\) gives valid solution.

Summary

The solution(s) found are the following \begin{align*} \tag{1} \frac {\ln \left (p\right )-\ln \left (b p-a \right )}{a} &= \frac {-\ln \left (b \operatorname {p0} -a \right )+\ln \left (\operatorname {p0} \right )+\left (t -\operatorname {t0} \right ) a}{a} \\ \end{align*}

Verification of solutions

\[ \frac {\ln \left (p\right )-\ln \left (b p-a \right )}{a} = \frac {-\ln \left (b \operatorname {p0} -a \right )+\ln \left (\operatorname {p0} \right )+\left (t -\operatorname {t0} \right ) a}{a} \] Verified OK.

1.33.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [p^{\prime }-a p+b p^{2}=0, p \left (\mathit {t0} \right )=\mathit {p0} \right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & p^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & p^{\prime }=a p-b p^{2} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {p^{\prime }}{a p-b p^{2}}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {p^{\prime }}{a p-b p^{2}}d t =\int 1d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\ln \left (p\right )}{a}-\frac {\ln \left (b p-a \right )}{a}=t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} p \\ {} & {} & p=\frac {{\mathrm e}^{c_{1} a +t a} a}{-1+b \,{\mathrm e}^{c_{1} a +t a}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} p \left (\mathit {t0} \right )=\mathit {p0} \\ {} & {} & \mathit {p0} =\frac {{\mathrm e}^{c_{1} a +\mathit {t0} a} a}{-1+b \,{\mathrm e}^{c_{1} a +\mathit {t0} a}} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\frac {-\mathit {t0} a +\ln \left (-\frac {\mathit {p0}}{-b \mathit {p0} +a}\right )}{a} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\frac {-\mathit {t0} a +\ln \left (-\frac {\mathit {p0}}{-b \mathit {p0} +a}\right )}{a}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & p=\frac {a \,{\mathrm e}^{\left (t -\mathit {t0} \right ) a} \mathit {p0}}{b \mathit {p0} \,{\mathrm e}^{\left (t -\mathit {t0} \right ) a}-b \mathit {p0} +a} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & p=\frac {a \,{\mathrm e}^{\left (t -\mathit {t0} \right ) a} \mathit {p0}}{b \mathit {p0} \,{\mathrm e}^{\left (t -\mathit {t0} \right ) a}-b \mathit {p0} +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.062 (sec). Leaf size: 29

dsolve([diff(p(t),t)=a*p(t)-b*p(t)^2,p(t0) = p0],p(t), singsol=all)
 

\[ p \left (t \right ) = \frac {a \operatorname {p0}}{\left (-\operatorname {p0} b +a \right ) {\mathrm e}^{-a \left (t -\operatorname {t0} \right )}+\operatorname {p0} b} \]

Solution by Mathematica

Time used: 0.865 (sec). Leaf size: 39

DSolve[{p'[t]==a*p[t]-b*p[t]^2,p[t0]==p0},p[t],t,IncludeSingularSolutions -> True]
 

\[ p(t)\to \frac {a \text {p0} e^{a t}}{b \text {p0} \left (e^{a t}-e^{a \text {t0}}\right )+a e^{a \text {t0}}} \]