Internal problem ID [11992]
Internal file name [OUTPUT/10645_Saturday_September_02_2023_02_48_56_PM_36373413/index.tex
]
Book: AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C.
ROBINSON. Cambridge University Press 2004
Section: Chapter 8, Separable equations. Exercises page 72
Problem number: 8.7.
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 {x^{\prime }-k x+x^{2}=0} \] With initial conditions \begin {align*} [x \left (0\right ) = x_{0}] \end {align*}
This is non linear first order ODE. In canonical form it is written as \begin {align*} x^{\prime } &= f(t,x)\\ &= k x -x^{2} \end {align*}
The \(x\) domain of \(f(t,x)\) when \(t=0\) is \[
\{-\infty
Integrating both sides gives \begin {align*} \int \frac {1}{k x -x^{2}}d x &= \int {dt}\\ \frac {\ln \left (x \right )-\ln \left (-k +x \right )}{k}&= t +c_{1} \end {align*}
Initial conditions are used to solve for \(c_{1}\). Substituting \(t=0\) and \(x=x_{0}\) in the above solution gives an
equation to solve for the constant of integration. \begin {align*} \frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k} = c_{1} \end {align*}
The solutions are \begin {align*} c_{1} = \frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k} \end {align*}
Trying the constant \begin {align*} c_{1} = \frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k} \end {align*}
Substituting \(c_{1}\) found above in the general solution gives \begin {align*} \frac {\ln \left (x \right )-\ln \left (-k +x \right )}{k} = t +\frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k} \end {align*}
The constant \(c_{1} = \frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k}\) gives valid solution.
Summary
The solution(s) found are the following \begin{align*}
\tag{1} \frac {\ln \left (x\right )-\ln \left (x-k \right )}{k} &= t +\frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k} \\
\end{align*} Verification of solutions
\[
\frac {\ln \left (x\right )-\ln \left (x-k \right )}{k} = t +\frac {\ln \left (x_{0} \right )-\ln \left (-k +x_{0} \right )}{k}
\] Verified OK.
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [x^{\prime }-k x+x^{2}=0, x \left (0\right )=x_{0} \right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & x^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=k x-x^{2} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {x^{\prime }}{k x-x^{2}}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {x^{\prime }}{k x-x^{2}}d t =\int 1d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\ln \left (x-k \right )}{k}+\frac {\ln \left (x\right )}{k}=t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x=\frac {k \,{\mathrm e}^{c_{1} k +t k}}{-1+{\mathrm e}^{c_{1} k +t k}} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} x \left (0\right )=x_{0} \\ {} & {} & x_{0} =\frac {k \,{\mathrm e}^{c_{1} k}}{-1+{\mathrm e}^{c_{1} k}} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\frac {\ln \left (-\frac {x_{0}}{k -x_{0}}\right )}{k} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\frac {\ln \left (-\frac {x_{0}}{k -x_{0}}\right )}{k}\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & x=\frac {{\mathrm e}^{t k} x_{0} k}{x_{0} {\mathrm e}^{t k}+k -x_{0}} \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & x=\frac {{\mathrm e}^{t k} x_{0} k}{x_{0} {\mathrm e}^{t k}+k -x_{0}} \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 0.046 (sec). Leaf size: 22
\[
x \left (t \right ) = \frac {k x_{0}}{\left (-x_{0} +k \right ) {\mathrm e}^{-k t}+x_{0}}
\]
✓ Solution by Mathematica
Time used: 1.052 (sec). Leaf size: 26
\[
x(t)\to \frac {k \text {x0} e^{k t}}{\text {x0} \left (e^{k t}-1\right )+k}
\]
3.11.2 Solving as quadrature ode
3.11.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
<- Bernoulli successful`
dsolve([diff(x(t),t)=k*x(t)-x(t)^2,x(0) = x__0],x(t), singsol=all)
DSolve[{x'[t]==k*x[t]-x[t]^2,{x[0]==x0}},x[t],t,IncludeSingularSolutions -> True]