Internal
problem
ID
[19714] Book
:
Elementary
Differential
Equations.
By
Thornton
C.
Fry.
D
Van
Nostrand.
NY.
First
Edition
(1929) Section
:
Chapter
IV.
Methods
of
solution:
First
order
equations.
section
24.
Problems
at
page
62 Problem
number
:
5 Date
solved
:
Friday, November 28, 2025 at 06:31:06 PM CAS
classification
:
[_quadrature]
\begin{align*} \int \frac {1}{k \left (-x n +A \right ) \left (-m x +M \right )}d x &= dt\\ \frac {\ln \left (-x n +A \right )}{k \left (A m -M n \right )}-\frac {\ln \left (-m x +M \right )}{k \left (A m -M n \right )}&= t +c_1 \end{align*}
Singular solutions are found by solving
\begin{align*} k \left (-x n +A \right ) \left (-m x +M \right )&= 0 \end{align*}
for \(x\). This is because we had to divide by this in the above step. This gives the following singular
solution(s), which also have to satisfy the given ODE.
\begin{align*} x = \frac {A}{n}\\ x = \frac {M}{m} \end{align*}
The following diagram is the phase line diagram. It classifies each of the above equilibrium
points as stable or not stable or semi-stable.
Simplifying the above gives
\begin{align*}
\frac {\ln \left (A -n x\right )-\ln \left (M -m x\right )}{k \left (A m -M n \right )} &= t +c_1 \\
x &= \frac {A}{n} \\
x &= \frac {M}{m} \\
\end{align*}
Solving for \(x\) gives
\begin{align*}
x &= \frac {A}{n} \\
x &= \frac {M}{m} \\
x &= \frac {A \,{\mathrm e}^{-A c_1 k m -A k m t +M c_1 k n +M k n t}-M}{{\mathrm e}^{-A c_1 k m -A k m t +M c_1 k n +M k n t} n -m} \\
\end{align*}
Summary of solutions found
\begin{align*}
x &= \frac {A}{n} \\
x &= \frac {M}{m} \\
x &= \frac {A \,{\mathrm e}^{-A c_1 k m -A k m t +M c_1 k n +M k n t}-M}{{\mathrm e}^{-A c_1 k m -A k m t +M c_1 k n +M k n t} n -m} \\
\end{align*}
We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant,
that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that
If the above condition is satisfied, then
the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can
do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not
work and we have to now look for an integrating factor to force this condition, which might or
might not exist. The first step is to write the ODE in standard form to check for exactness, which
is
Since \(\frac {\partial M}{\partial x} \neq \frac {\partial N}{\partial t}\), then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating
factor to make it exact. Let
\begin{align*} A &= \frac {1}{N} \left (\frac {\partial M}{\partial x} - \frac {\partial N}{\partial t} \right ) \\ &=1\left ( \left ( k n \left (-m x +M \right )+k \left (-x n +A \right ) m\right ) - \left (0 \right ) \right ) \\ &=\left (\left (-2 x n +A \right ) m +M n \right ) k \end{align*}
Since \(A\) depends on \(x\), it can not be used to obtain an integrating factor. We will now try a second
method to find an integrating factor. Let
\begin{align*} B &= \frac {1}{M} \left ( \frac {\partial N}{\partial t} - \frac {\partial M}{\partial x} \right ) \\ &=-\frac {1}{k \left (-x n +A \right ) \left (-m x +M \right )}\left ( \left ( 0\right ) - \left (k n \left (-m x +M \right )+k \left (-x n +A \right ) m \right ) \right ) \\ &=\frac {\left (-2 x n +A \right ) m +M n}{\left (-x n +A \right ) \left (-m x +M \right )} \end{align*}
Since \(B\) does not depend on \(t\), it can be used to obtain an integrating factor. Let the integrating
factor be \(\mu \). Then
\begin{align*} \mu &= e^{\int B \mathop {\mathrm {d}x}} \\ &= e^{\int \frac {\left (-2 x n +A \right ) m +M n}{\left (-x n +A \right ) \left (-m x +M \right )}\mathop {\mathrm {d}x} } \end{align*}
The result of integrating gives
\begin{align*} \mu &= e^{-\ln \left (\left (-m x +M \right ) \left (-x n +A \right )\right ) } \\ &= \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )} \end{align*}
\(M\) and \(N\) are now multiplied by this integrating factor, giving new \(M\) and new \(N\) which are called \(\overline {M}\) and \(\overline {N}\) so
not to confuse them with the original \(M\) and \(N\).
\begin{align*} \overline {M} &=\mu M \\ &= \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )}\left (-k \left (-x n +A \right ) \left (-m x +M \right )\right ) \\ &= -k \end{align*}
And
\begin{align*} \overline {N} &=\mu N \\ &= \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )}\left (1\right ) \\ &= \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )} \end{align*}
So now a modified ODE is obtained from the original ODE which will be exact and can be solved
using the standard method. The modified ODE is
Where \(f(x)\) is used for the constant of integration since \(\phi \) is a function of
both \(t\) and \(x\). Taking derivative of equation (3) w.r.t \(x\) gives
But equation (2) says that \(\frac {\partial \phi }{\partial x} = \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )}\). Therefore
equation (4) becomes
\begin{equation}
\tag{5} \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )} = 0+f'(x)
\end{equation}
Solving equation (5) for \( f'(x)\) gives
\[
f'(x) = \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )}
\]
Integrating the above w.r.t \(x\) gives
\begin{align*}
\int f'(x) \mathop {\mathrm {d}x} &= \int \left ( \frac {1}{\left (-x n +A \right ) \left (-m x +M \right )}\right ) \mathop {\mathrm {d}x} \\
f(x) &= \frac {\ln \left (-x n +A \right )}{A m -M n}-\frac {\ln \left (-m x +M \right )}{A m -M n}+ c_1 \\
\end{align*}
Where \(c_1\) is
constant of integration. Substituting result found above for \(f(x)\) into equation (3) gives \(\phi \)
\[
\phi = -t k +\frac {\ln \left (-x n +A \right )}{A m -M n}-\frac {\ln \left (-m x +M \right )}{A m -M n}+ c_1
\]
But since \(\phi \)
itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is new constant and combining \(c_1\) and \(c_2\) constants
into the constant \(c_1\) gives the solution as
\[
c_1 = -t k +\frac {\ln \left (-x n +A \right )}{A m -M n}-\frac {\ln \left (-m x +M \right )}{A m -M n}
\]
Simplifying the above gives
\begin{align*}
\frac {-A k m t +M k n t +\ln \left (A -n x\right )-\ln \left (M -m x\right )}{A m -M n} &= c_1 \\
\end{align*}
Solving for \(x\) gives
\begin{align*}
x &= \frac {A \,{\mathrm e}^{-A k m t +M k n t -m c_1 A +M n c_1}-M}{{\mathrm e}^{-A k m t +M k n t -m c_1 A +M n c_1} n -m} \\
\end{align*}
Summary of solutions found
\begin{align*}
x &= \frac {A \,{\mathrm e}^{-A k m t +M k n t -m c_1 A +M n c_1}-M}{{\mathrm e}^{-A k m t +M k n t -m c_1 A +M n c_1} n -m} \\
\end{align*}
\begin{align*} p = k \left (-x n +A \right ) \left (-m x +M \right ) \end{align*}
Solving for \(x\) from the above results in
\begin{align*}
\tag{1} x &= \frac {A k m +M k n +\sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p}}{2 k m n} \\
\tag{2} x &= \frac {A k m +M k n -\sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p}}{2 k m n} \\
\end{align*}
This has the form
\begin{align*} x=t f(p)+g(p)\tag {*} \end{align*}
Where \(f,g\) are functions of \(p=x'(t)\). Each of the above ode’s is dAlembert ode which is now solved.
Comparing the form \(x=t f + g\) to (1A) shows that
\begin{align*} f &= 0\\ g &= \frac {A k m +M k n +\sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}}{2 k m n} \end{align*}
Hence (2) becomes
\begin{equation}
\tag{2A} p = \frac {p^{\prime }\left (t \right )}{\sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p}}
\end{equation}
The singular solution is found by setting \(\frac {dp}{dt}=0\) in the above which gives
\begin{align*} p = 0 \end{align*}
Solving the above for \(p\) results in
\begin{align*} p_{1} &=0 \end{align*}
Substituting these in (1A) and keeping singular solution that verifies the ode gives
\begin{align*} x = \frac {A k m +M k n +\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \end{align*}
The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}}\neq 0\). From eq. (2A). This results in
\begin{equation}
\tag{3} p^{\prime }\left (t \right ) = p \left (t \right ) \sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p \left (t \right )}
\end{equation}
This ODE is now solved for \(p \left (t \right )\).
No inversion is needed.
Integrating gives
\begin{align*} \int \frac {1}{p \sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}}d p &= dt\\ -\frac {\ln \left (A k m -M k n +\sqrt {4 k m n p +\left (A m -M n \right )^{2} k^{2}}\right )}{k \left (A m -M n \right )}+\frac {\ln \left (A k m -M k n -\sqrt {4 k m n p +\left (A m -M n \right )^{2} k^{2}}\right )}{k \left (A m -M n \right )}&= t +c_1 \end{align*}
Singular solutions are found by solving
\begin{align*} p \sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}&= 0 \end{align*}
for \(p \left (t \right )\). This is because we had to divide by this in the above step. This gives the following singular
solution(s), which also have to satisfy the given ODE.
\begin{align*} p \left (t \right ) = 0\\ p \left (t \right ) = -\frac {\left (A^{2} m^{2}-2 A M m n +M^{2} n^{2}\right ) k}{4 m n} \end{align*}
Substituing the above solution for \(p\) in (2A) gives
\begin{align*}
x &= \frac {A k m +M k n +\sqrt {\left (\left (A m -M n \right )^{2} k -\frac {4 \,{\mathrm e}^{k \left (t +c_1 \right ) \left (A m -M n \right )} k \left (A^{2} m^{2}-2 A M m n +M^{2} n^{2}\right )}{{\mathrm e}^{2 k \left (t +c_1 \right ) \left (A m -M n \right )}+2 \,{\mathrm e}^{k \left (t +c_1 \right ) \left (A m -M n \right )}+1}\right ) k}}{2 k m n} \\
x &= \frac {A k m +M k n +\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +1}{2 k m n} \\
\end{align*}
Comparing the form \(x=t f + g\) to (1A) shows that
\begin{align*} f &= 0\\ g &= \frac {A k m +M k n -\sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}}{2 k m n} \end{align*}
Hence (2) becomes
\begin{equation}
\tag{2A} p = -\frac {p^{\prime }\left (t \right )}{\sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p}}
\end{equation}
The singular solution is found by setting \(\frac {dp}{dt}=0\) in the above which gives
\begin{align*} p = 0 \end{align*}
Solving the above for \(p\) results in
\begin{align*} p_{1} &=0 \end{align*}
Substituting these in (1A) and keeping singular solution that verifies the ode gives
\begin{align*} x = \frac {A k m +M k n -\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \end{align*}
The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}}\neq 0\). From eq. (2A). This results in
\begin{equation}
\tag{3} p^{\prime }\left (t \right ) = -p \left (t \right ) \sqrt {A^{2} k^{2} m^{2}-2 A M \,k^{2} m n +M^{2} k^{2} n^{2}+4 k m n p \left (t \right )}
\end{equation}
This ODE is now solved for \(p \left (t \right )\).
No inversion is needed.
Integrating gives
\begin{align*} \int -\frac {1}{p \sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}}d p &= dt\\ \frac {\ln \left (A k m -M k n +\sqrt {4 k m n p +\left (A m -M n \right )^{2} k^{2}}\right )}{k \left (A m -M n \right )}-\frac {\ln \left (A k m -M k n -\sqrt {4 k m n p +\left (A m -M n \right )^{2} k^{2}}\right )}{k \left (A m -M n \right )}&= t +c_2 \end{align*}
Singular solutions are found by solving
\begin{align*} -p \sqrt {\left (\left (A m -M n \right )^{2} k +4 m n p \right ) k}&= 0 \end{align*}
for \(p \left (t \right )\). This is because we had to divide by this in the above step. This gives the following singular
solution(s), which also have to satisfy the given ODE.
\begin{align*} p \left (t \right ) = 0\\ p \left (t \right ) = -\frac {\left (A^{2} m^{2}-2 A M m n +M^{2} n^{2}\right ) k}{4 m n} \end{align*}
Substituing the above solution for \(p\) in (2A) gives
\begin{align*}
x &= \frac {A k m +M k n -\sqrt {\left (\left (A m -M n \right )^{2} k -\frac {4 \,{\mathrm e}^{k \left (t +c_2 \right ) \left (A m -M n \right )} k \left (A^{2} m^{2}-2 A M m n +M^{2} n^{2}\right )}{{\mathrm e}^{2 k \left (t +c_2 \right ) \left (A m -M n \right )}+2 \,{\mathrm e}^{k \left (t +c_2 \right ) \left (A m -M n \right )}+1}\right ) k}}{2 k m n} \\
x &= \frac {A k m +M k n -\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n -1}{2 k m n} \\
\end{align*}
Simplifying the above gives
\begin{align*}
x &= \frac {A k m +M k n +\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +\sqrt {k^{2} \left (A m -M n \right )^{2} \tanh \left (\frac {k \left (t +c_1 \right ) \left (A m -M n \right )}{2}\right )^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +1}{2 k m n} \\
x &= \frac {A k m +M k n -\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n -\sqrt {k^{2} \left (A m -M n \right )^{2} \tanh \left (\frac {k \left (t +c_2 \right ) \left (A m -M n \right )}{2}\right )^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n -\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n -1}{2 k m n} \\
\end{align*}
The solution
\[
x = \frac {A k m +M k n -1}{2 k m n}
\]
was
found not to satisfy the ode or the IC. Hence it is removed. The solution
\[
x = \frac {A k m +M k n +1}{2 k m n}
\]
was found not to satisfy
the ode or the IC. Hence it is removed.
Summary of solutions found
\begin{align*}
x &= \frac {A k m +M k n -\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +\sqrt {\left (A m -M n \right )^{2} k^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n +\sqrt {k^{2} \left (A m -M n \right )^{2} \tanh \left (\frac {k \left (t +c_1 \right ) \left (A m -M n \right )}{2}\right )^{2}}}{2 k m n} \\
x &= \frac {A k m +M k n -\sqrt {k^{2} \left (A m -M n \right )^{2} \tanh \left (\frac {k \left (t +c_2 \right ) \left (A m -M n \right )}{2}\right )^{2}}}{2 k m n} \\
\end{align*}
\[
x = \frac {-A \,{\mathrm e}^{-k \left (c_1 +t \right ) \left (A m -M n \right )}+M}{-{\mathrm e}^{-k \left (c_1 +t \right ) \left (A m -M n \right )} n +m}
\]
Maple trace
Methodsfor first order ODEs:---Trying classification methods ---tryinga quadraturetrying1st order lineartryingBernoullitryingseparable<-separable successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d t}x \left (t \right )=k \left (A -19714 x \left (t \right )\right ) \left (M -m x \left (t \right )\right ) \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}x \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}x \left (t \right )=k \left (A -19714 x \left (t \right )\right ) \left (M -m x \left (t \right )\right ) \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d t}x \left (t \right )}{\left (A -19714 x \left (t \right )\right ) \left (M -m x \left (t \right )\right )}=k \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {\frac {d}{d t}x \left (t \right )}{\left (A -19714 x \left (t \right )\right ) \left (M -m x \left (t \right )\right )}d t =\int k d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\ln \left (M -m x \left (t \right )\right )}{A m -19714 M}+\frac {\ln \left (A -19714 x \left (t \right )\right )}{A m -19714 M}=k t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \left (t \right ) \\ {} & {} & x \left (t \right )=-\frac {-M \,{\mathrm e}^{A k m t +A \mathit {C1} m -19714 M k t -19714 \mathit {C1} M}+A}{-19714+m \,{\mathrm e}^{A k m t +A \mathit {C1} m -19714 M k t -19714 \mathit {C1} M}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & x \left (t \right )=\frac {M \,{\mathrm e}^{\left (k t +\mathit {C1} \right ) \left (A m -19714 M \right )}-A}{{\mathrm e}^{\left (k t +\mathit {C1} \right ) \left (A m -19714 M \right )} m -19714} \\ \bullet & {} & \textrm {Redefine the integration constant(s)}\hspace {3pt} \\ {} & {} & x \left (t \right )=\frac {M \mathit {C1} \,{\mathrm e}^{k t \left (A m -19714 M \right )}-A}{\mathit {C1} \,{\mathrm e}^{k t \left (A m -19714 M \right )} m -19714} \end {array} \]
✓ Mathematica. Time used: 2.226 (sec). Leaf size: 82