2.3.20 Problem 21
Internal
problem
ID
[13300]
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
:
21
Date
solved
:
Wednesday, December 31, 2025 at 01:04:04 PM
CAS
classification
:
[_Riccati]
2.3.20.1 Solved using first_order_ode_riccati
7.763 (sec)
Entering first order ode riccati solver
\begin{align*}
\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right ) \left (y^{\prime }-y^{2}\right )+a \,\lambda ^{2} {\mathrm e}^{\lambda x}+\mu ^{2} {\mathrm e}^{\mu x} b&=0 \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= \frac {a \,{\mathrm e}^{\lambda x} y^{2}-a \,\lambda ^{2} {\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x} y^{2}-\mu ^{2} {\mathrm e}^{\mu x} b +c y^{2}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c} \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)=-\frac {a \,\lambda ^{2} {\mathrm e}^{\lambda x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {\mu ^{2} {\mathrm e}^{\mu x} b}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\), \(f_1(x)=0\) and \(f_2(x)=1\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u} \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' &=0\\ f_1 f_2 &=0\\ f_2^2 f_0 &=-\frac {a \,\lambda ^{2} {\mathrm e}^{\lambda x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {\mu ^{2} {\mathrm e}^{\mu x} b}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c} \end{align*}
Substituting the above terms back in equation (2) gives
\[
u^{\prime \prime }\left (x \right )+\left (-\frac {a \,\lambda ^{2} {\mathrm e}^{\lambda x}}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}-\frac {\mu ^{2} {\mathrm e}^{\mu x} b}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}\right ) u \left (x \right ) = 0
\]
Unable to solve. Will ask Maple to solve
this ode now.
The solution for \(u \left (x \right )\) is
\begin{equation}
\tag{3} u \left (x \right ) = \left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x c_1 +c_2 \right ) \left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )
\end{equation}
Taking derivative gives \begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {c_1}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}+\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x c_1 +c_2 \right ) \left (a \lambda \,{\mathrm e}^{\lambda x}+\mu \,{\mathrm e}^{\mu x} b \right )
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u} \\
y &= -\frac {\frac {c_1}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}+\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x c_1 +c_2 \right ) \left (a \lambda \,{\mathrm e}^{\lambda x}+\mu \,{\mathrm e}^{\mu x} b \right )}{\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x c_1 +c_2 \right ) \left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )} \\
\end{align*}
Doing
change of constants, the above solution becomes \[
y = -\frac {\frac {1}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}+\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x +c_3 \right ) \left (a \lambda \,{\mathrm e}^{\lambda x}+\mu \,{\mathrm e}^{\mu x} b \right )}{\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x +c_3 \right ) \left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )}
\]
Summary of solutions found
\begin{align*}
y &= -\frac {\frac {1}{{\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c}+\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x +c_3 \right ) \left (a \lambda \,{\mathrm e}^{\lambda x}+\mu \,{\mathrm e}^{\mu x} b \right )}{\left (\int \frac {1}{\left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )^{2}}d x +c_3 \right ) \left ({\mathrm e}^{\lambda x} a +{\mathrm e}^{\mu x} b +c \right )} \\
\end{align*}
2.3.20.2 ✓ Maple. Time used: 0.005 (sec). Leaf size: 176
ode:=(a*exp(lambda*x)+b*exp(mu*x)+c)*(diff(y(x),x)-y(x)^2)+a*lambda^2*exp(lambda*x)+b*mu^2*exp(mu*x) = 0;
dsolve(ode,y(x), singsol=all);
\[
y = \frac {\left (-a b \left (\lambda +\mu \right ) {\mathrm e}^{x \left (\lambda +\mu \right )}-a^{2} \lambda \,{\mathrm e}^{2 \lambda x}-b^{2} \mu \,{\mathrm e}^{2 \mu x}-c \left (a \lambda \,{\mathrm e}^{\lambda x}+b \mu \,{\mathrm e}^{\mu x}\right )\right ) \int \frac {1}{\left (a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c \right )^{2}}d x -a b c_1 \left (\lambda +\mu \right ) {\mathrm e}^{x \left (\lambda +\mu \right )}-a^{2} \lambda \,{\mathrm e}^{2 \lambda x} c_1 -{\mathrm e}^{\lambda x} c_1 a c \lambda -b^{2} \mu \,{\mathrm e}^{2 \mu x} c_1 -{\mathrm e}^{\mu x} c_1 b c \mu -1}{\left (a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c \right )^{2} \left (c_1 +\int \frac {1}{\left (a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c \right )^{2}}d x \right )}
\]
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:
trying Riccati_symmetries
trying Riccati to 2nd Order
-> Calling odsolve with the ODE, diff(diff(y(x),x),x) = (a*lambda^2*exp(
lambda*x)+b*mu^2*exp(mu*x))/(a*exp(lambda*x)+b*exp(mu*x)+c)*y(x), y(x)
*** Sublevel 2 ***
Methods for second order ODEs:
--- Trying classification methods ---
trying a symmetry of the form [xi=0, eta=F(x)]
<- linear_1 successful
<- Riccati to 2nd Order successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c \right ) \left (\frac {d}{d x}y \left (x \right )-y \left (x \right )^{2}\right )+a \,\lambda ^{2} {\mathrm e}^{\lambda x}+b \,\mu ^{2} {\mathrm e}^{\mu x}=0 \\ \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 )=\frac {{\mathrm e}^{\lambda x} y \left (x \right )^{2} a -a \,\lambda ^{2} {\mathrm e}^{\lambda x}+{\mathrm e}^{\mu x} y \left (x \right )^{2} b -b \,\mu ^{2} {\mathrm e}^{\mu x}+y \left (x \right )^{2} c}{a \,{\mathrm e}^{\lambda x}+b \,{\mathrm e}^{\mu x}+c} \end {array} \]
2.3.20.3 ✓ Mathematica. Time used: 5.528 (sec). Leaf size: 393
ode=(a*Exp[\[Lambda]*x]+b*Exp[\[Mu]*x]+c)*(D[y[x],x]-y[x]^2)+a*\[Lambda]^2*Exp[\[Lambda]*x]+b*\[Mu]^2*Exp[\[Mu]*x]==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\[
\text {Solve}\left [\int _1^x-\frac {-a e^{\lambda K[1]} \lambda ^2-b e^{\mu K[1]} \mu ^2+a e^{\lambda K[1]} y(x)^2+b e^{\mu K[1]} y(x)^2+c y(x)^2}{\left (e^{\lambda K[1]} a+b e^{\mu K[1]}+c\right ) \left (a e^{\lambda K[1]} \lambda +b e^{\mu K[1]} \mu +a e^{\lambda K[1]} y(x)+b e^{\mu K[1]} y(x)+c y(x)\right )^2}dK[1]+\int _1^{y(x)}\left (\frac {1}{\left (a e^{x \lambda } \lambda +b e^{x \mu } \mu +a e^{x \lambda } K[2]+b e^{x \mu } K[2]+c K[2]\right )^2}-\int _1^x\left (\frac {2 \left (-a e^{\lambda K[1]} \lambda ^2-b e^{\mu K[1]} \mu ^2+a e^{\lambda K[1]} K[2]^2+b e^{\mu K[1]} K[2]^2+c K[2]^2\right )}{\left (a e^{\lambda K[1]} \lambda +b e^{\mu K[1]} \mu +a e^{\lambda K[1]} K[2]+b e^{\mu K[1]} K[2]+c K[2]\right )^3}-\frac {2 a e^{\lambda K[1]} K[2]+2 b e^{\mu K[1]} K[2]+2 c K[2]}{\left (e^{\lambda K[1]} a+b e^{\mu K[1]}+c\right ) \left (a e^{\lambda K[1]} \lambda +b e^{\mu K[1]} \mu +a e^{\lambda K[1]} K[2]+b e^{\mu K[1]} K[2]+c K[2]\right )^2}\right )dK[1]\right )dK[2]=c_1,y(x)\right ]
\]
2.3.20.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
c = symbols("c")
lambda_ = symbols("lambda_")
mu = symbols("mu")
y = Function("y")
ode = Eq(a*lambda_**2*exp(lambda_*x) + b*mu**2*exp(mu*x) + (-y(x)**2 + Derivative(y(x), x))*(a*exp(lambda_*x) + b*exp(mu*x) + c),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE Derivative(y(x), x) - (-a*lambda_**2*exp(lambda_*x) + a*y(x)**2*exp(lambda_*x) - b*mu**2*exp(mu*x) + b*y(x)**2*exp(mu*x) + c*y(x)**2)/(a*exp(lambda_*x) + b*exp(mu*x) + c) cannot be solved by the factorable group method