2.3.18 Problem 19
Internal
problem
ID
[13298]
Book
:
Handbook
of
exact
solutions
for
ordinary
differential
equations.
By
Polyanin
and
Zaitsev.
Second
edition
Section
:
Chapter
1,
section
1.2.
Riccati
Equation.
subsection
1.2.3.
Equations
Containing
Exponential
Functions
Problem
number
:
19
Date
solved
:
Wednesday, December 31, 2025 at 01:03:00 PM
CAS
classification
:
[[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]
2.3.18.1 Solved using first_order_ode_riccati
3.970 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime }&={\mathrm e}^{\mu x} \left (y-b \,{\mathrm e}^{\lambda x}\right )^{2}+b \lambda \,{\mathrm e}^{\lambda x} \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= {\mathrm e}^{\mu x} {\mathrm e}^{2 \lambda x} b^{2}-2 \,{\mathrm e}^{\mu x} {\mathrm e}^{\lambda x} y b +{\mathrm e}^{\mu x} y^{2}+b \lambda \,{\mathrm e}^{\lambda x} \end{align*}
This is a Riccati ODE. Comparing the ODE to solve
\[
y' = \textit {the\_rhs}
\]
With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows
that \(f_0(x)={\mathrm e}^{\mu x} {\mathrm e}^{2 \lambda x} b^{2}+b \lambda \,{\mathrm e}^{\lambda x}\), \(f_1(x)=-2 b \,{\mathrm e}^{\lambda x} {\mathrm e}^{\mu x}\) and \(f_2(x)={\mathrm e}^{\mu x}\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \,{\mathrm e}^{\mu x}} \tag {1} \end{align*}
Using the above substitution in the given ODE results (after some simplification) in a second
order ODE to solve for \(u(x)\) which is
\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}
But
\begin{align*} f_2' &=\mu \,{\mathrm e}^{\mu x}\\ f_1 f_2 &=-2 b \,{\mathrm e}^{\lambda x} {\mathrm e}^{2 \mu x}\\ f_2^2 f_0 &={\mathrm e}^{2 \mu x} \left ({\mathrm e}^{\mu x} {\mathrm e}^{2 \lambda x} b^{2}+b \lambda \,{\mathrm e}^{\lambda x}\right ) \end{align*}
Substituting the above terms back in equation (2) gives
\[
{\mathrm e}^{\mu x} u^{\prime \prime }\left (x \right )-\left (\mu \,{\mathrm e}^{\mu x}-2 b \,{\mathrm e}^{\lambda x} {\mathrm e}^{2 \mu x}\right ) u^{\prime }\left (x \right )+{\mathrm e}^{2 \mu x} \left ({\mathrm e}^{\mu x} {\mathrm e}^{2 \lambda x} b^{2}+b \lambda \,{\mathrm e}^{\lambda x}\right ) u \left (x \right ) = 0
\]
Entering second order change of variable
on \(y\) method 1 solverIn normal form the given ode is written as \begin{align*} \frac {d^{2}u}{d x^{2}}+p \left (x \right ) \left (\frac {d u}{d x}\right )+q \left (x \right ) u&=0 \tag {2} \end{align*}
Where
\begin{align*} p \left (x \right )&=\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}\\ q \left (x \right )&=b \left ({\mathrm e}^{x \left (2 \lambda +3 \mu \right )} b +{\mathrm e}^{x \left (\lambda +2 \mu \right )} \lambda \right ) {\mathrm e}^{-\mu x} \end{align*}
Calculating the Liouville ode invariant \(Q\) given by
\begin{align*} Q &= q - \frac {p'}{2}- \frac {p^2}{4} \\ &= b \left ({\mathrm e}^{x \left (2 \lambda +3 \mu \right )} b +{\mathrm e}^{x \left (\lambda +2 \mu \right )} \lambda \right ) {\mathrm e}^{-\mu x} - \frac {\left (\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}\right )'}{2}- \frac {\left (\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}\right )^2}{4} \\ &= b \left ({\mathrm e}^{x \left (2 \lambda +3 \mu \right )} b +{\mathrm e}^{x \left (\lambda +2 \mu \right )} \lambda \right ) {\mathrm e}^{-\mu x} - \frac {\left (\left (2 b \left (\lambda +2 \mu \right ) {\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu ^{2} {\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}-\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x} \mu \right )}{2}- \frac {\left (\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right )^{2} {\mathrm e}^{-2 \mu x}\right )}{4} \\ &= b \left ({\mathrm e}^{x \left (2 \lambda +3 \mu \right )} b +{\mathrm e}^{x \left (\lambda +2 \mu \right )} \lambda \right ) {\mathrm e}^{-\mu x} - \left (\frac {\left (2 b \left (\lambda +2 \mu \right ) {\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu ^{2} {\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}}{2}-\frac {\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x} \mu }{2}\right )-\frac {\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right )^{2} {\mathrm e}^{-2 \mu x}}{4}\\ &= -\frac {\mu ^{2}}{4} \end{align*}
Since the Liouville ode invariant does not depend on the independent variable \(x\) then the
transformation
\begin{align*} u = v \left (x \right ) z \left (x \right )\tag {3} \end{align*}
is used to change the original ode to a constant coefficients ode in \(v\). In (3) the term \(z \left (x \right )\) is given by
\begin{align*} z \left (x \right )&={\mathrm e}^{-\int \frac {p \left (x \right )}{2}d x}\\ &= e^{-\int \frac {\left (2 b \,{\mathrm e}^{x \left (\lambda +2 \mu \right )}-\mu \,{\mathrm e}^{\mu x}\right ) {\mathrm e}^{-\mu x}}{2} }\\ &= {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}\tag {5} \end{align*}
Hence (3) becomes
\begin{align*} u = v \left (x \right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}\tag {4} \end{align*}
Applying this change of variable to the original ode results in
\begin{align*} -\frac {\left (v \left (x \right ) \mu ^{2}-4 \frac {d^{2}}{d x^{2}}v \left (x \right )\right ) {\mathrm e}^{\frac {-2 b \,{\mathrm e}^{x \left (\lambda +\mu \right )}+3 \mu x \left (\lambda +\mu \right )}{2 \lambda +2 \mu }}}{4} = 0 \end{align*}
Which is now solved for \(v \left (x \right )\).
The above ode simplifies to
\begin{align*} \frac {d^{2}}{d x^{2}}v \left (x \right )-\frac {v \left (x \right ) \mu ^{2}}{4} = 0 \end{align*}
Entering second order linear constant coefficient ode solver
This is second order with constant coefficients homogeneous ODE. In standard form the
ODE is
\[ A v''(x) + B v'(x) + C v(x) = 0 \]
Where in the above \(A=1, B=0, C=-\frac {\mu ^{2}}{4}\). Let the solution be \(v \left (x \right )=e^{\lambda x}\). Substituting this into the ODE
gives \[ \lambda ^{2} {\mathrm e}^{x \lambda }-\frac {\mu ^{2} {\mathrm e}^{x \lambda }}{4} = 0 \tag {1} \]
Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda x}\)
gives \[ \lambda ^{2}-\frac {\mu ^{2}}{4} = 0 \tag {2} \]
Equation (2) is the characteristic equation of the ODE. Its roots determine the
general solution form.Using the quadratic formula \[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \]
Substituting \(A=1, B=0, C=-\frac {\mu ^{2}}{4}\) into the above gives
\begin{align*} \lambda _{1,2} &= \frac {0}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {0^2 - (4) \left (1\right )\left (-\frac {\mu ^{2}}{4}\right )}\\ &= \pm \frac {\sqrt {\mu ^{2}}}{2} \end{align*}
Hence
\begin{align*}
\lambda _1 &= + \frac {\sqrt {\mu ^{2}}}{2} \\
\lambda _2 &= - \frac {\sqrt {\mu ^{2}}}{2} \\
\end{align*}
Which simplifies to \begin{align*}
\lambda _1 &= \frac {\sqrt {\mu ^{2}}}{2} \\
\lambda _2 &= -\frac {\sqrt {\mu ^{2}}}{2} \\
\end{align*}
Since roots are distinct, then the solution is \begin{align*}
v \left (x \right ) &= c_1 e^{\lambda _1 x} + c_2 e^{\lambda _2 x} \\
v \left (x \right ) &= c_1 e^{\left (\frac {\sqrt {\mu ^{2}}}{2}\right )x} +c_2 e^{\left (-\frac {\sqrt {\mu ^{2}}}{2}\right )x} \\
\end{align*}
Or \[
v \left (x \right ) =c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}
\]
Now that \(v \left (x \right )\) is known,
then \begin{align*} u&= v \left (x \right ) z \left (x \right )\\ &= \left (c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) \left (z \left (x \right )\right )\tag {7} \end{align*}
But from (5)
\begin{align*} z \left (x \right )&= {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }} \end{align*}
Hence (7) becomes
\begin{align*} u = \left (c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }} \end{align*}
Taking derivative gives
\begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \left (\frac {c_1 \sqrt {\mu ^{2}}\, {\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}-\frac {c_2 \sqrt {\mu ^{2}}\, {\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}+\left (c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) \left (\frac {\mu }{2}-b \,{\mathrm e}^{x \left (\lambda +\mu \right )}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u \,{\mathrm e}^{\mu x}} \\
y &= -\frac {\left (\left (\frac {c_1 \sqrt {\mu ^{2}}\, {\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}-\frac {c_2 \sqrt {\mu ^{2}}\, {\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}+\left (c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) \left (\frac {\mu }{2}-b \,{\mathrm e}^{x \left (\lambda +\mu \right )}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}\right ) {\mathrm e}^{-\mu x} {\mathrm e}^{-\frac {\mu x}{2}+\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}}{c_1 \,{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_2 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}} \\
\end{align*}
Doing change of
constants, the above solution becomes \[
y = -\frac {\left (\left (\frac {\sqrt {\mu ^{2}}\, {\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}-\frac {c_3 \sqrt {\mu ^{2}}\, {\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}+\left ({\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) \left (\frac {\mu }{2}-b \,{\mathrm e}^{x \left (\lambda +\mu \right )}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}\right ) {\mathrm e}^{-\mu x} {\mathrm e}^{-\frac {\mu x}{2}+\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}}{{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}}
\]
Summary of solutions found
\begin{align*}
y &= -\frac {\left (\left (\frac {\sqrt {\mu ^{2}}\, {\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}-\frac {c_3 \sqrt {\mu ^{2}}\, {\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}}{2}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}+\left ({\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}\right ) \left (\frac {\mu }{2}-b \,{\mathrm e}^{x \left (\lambda +\mu \right )}\right ) {\mathrm e}^{\frac {\mu x}{2}-\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}\right ) {\mathrm e}^{-\mu x} {\mathrm e}^{-\frac {\mu x}{2}+\frac {b \,{\mathrm e}^{x \left (\lambda +\mu \right )}}{\lambda +\mu }}}{{\mathrm e}^{\frac {\sqrt {\mu ^{2}}\, x}{2}}+c_3 \,{\mathrm e}^{-\frac {\sqrt {\mu ^{2}}\, x}{2}}} \\
\end{align*}
2.3.18.2 ✓ Maple. Time used: 0.003 (sec). Leaf size: 38
ode:=diff(y(x),x) = exp(mu*x)*(y(x)-b*exp(lambda*x))^2+b*lambda*exp(lambda*x);
dsolve(ode,y(x), singsol=all);
\[
y = \frac {-c_1 \,\mu ^{2}+b \,{\mathrm e}^{\lambda x} \left (c_1 \mu \,{\mathrm e}^{\mu x}+1\right )}{c_1 \mu \,{\mathrm e}^{\mu x}+1}
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
trying inverse linear
trying homogeneous types:
trying Chini
differential order: 1; looking for linear symmetries
trying exact
Looking for potential symmetries
trying Riccati
trying Riccati sub-methods:
<- Riccati particular polynomial solution successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )={\mathrm e}^{\mu x} \left (y \left (x \right )-b \,{\mathrm e}^{\lambda x}\right )^{2}+b \lambda \,{\mathrm e}^{\lambda x} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )={\mathrm e}^{\mu x} \left (y \left (x \right )-b \,{\mathrm e}^{\lambda x}\right )^{2}+b \lambda \,{\mathrm e}^{\lambda x} \end {array} \]
2.3.18.3 ✓ Mathematica. Time used: 0.597 (sec). Leaf size: 40
ode=D[y[x],x]==Exp[\[Mu]*x]*(y[x]-b*Exp[\[Lambda]*x])^2+b*\[Lambda]*Exp[\[Lambda]*x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to b e^{\lambda x}+\frac {\mu }{-e^{\mu x}+c_1 \mu }\\ y(x)&\to b e^{\lambda x} \end{align*}
2.3.18.4 ✗ Sympy
from sympy import *
x = symbols("x")
b = symbols("b")
lambda_ = symbols("lambda_")
mu = symbols("mu")
y = Function("y")
ode = Eq(-b*lambda_*exp(lambda_*x) - (-b*exp(lambda_*x) + y(x))**2*exp(mu*x) + Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE -b**2*exp(x*(2*lambda_ + mu)) - b*lambda_*exp(lambda_*x) + 2*b*y(x)*exp(x*(lambda_ + mu)) - y(x)**2*exp(mu*x) + Derivative(y(x), x) cannot be solved by the factorable group method