2.3.9 Problem 9
Internal
problem
ID
[13289]
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
:
9
Date
solved
:
Wednesday, December 31, 2025 at 12:57:30 PM
CAS
classification
:
[_Riccati]
2.3.9.1 Solved using first_order_ode_riccati
10.557 (sec)
Entering first order ode riccati solver
\begin{align*}
y^{\prime }&=a \,{\mathrm e}^{k x} y^{2}+b \,{\mathrm e}^{s x} \\
\end{align*}
In canonical form the ODE is \begin{align*} y' &= F(x,y)\\ &= a \,{\mathrm e}^{k x} y^{2}+b \,{\mathrm e}^{s 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)=b \,{\mathrm e}^{s x}\), \(f_1(x)=0\) and \(f_2(x)={\mathrm e}^{k x} a\). Let \begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \,{\mathrm e}^{k x} a} \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' &=k \,{\mathrm e}^{k x} a\\ f_1 f_2 &=0\\ f_2^2 f_0 &={\mathrm e}^{2 k x} a^{2} b \,{\mathrm e}^{s x} \end{align*}
Substituting the above terms back in equation (2) gives
\[
{\mathrm e}^{k x} a u^{\prime \prime }\left (x \right )-k \,{\mathrm e}^{k x} a u^{\prime }\left (x \right )+{\mathrm e}^{2 k x} a^{2} b \,{\mathrm e}^{s x} 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 ) = c_1 \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )+c_2 \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )
\end{equation}
Taking derivative gives \begin{equation}
\tag{4} u^{\prime }\left (x \right ) = \frac {c_1 k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 c_1 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselJ}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}+\frac {c_2 k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 c_2 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselY}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}
\end{equation}
Substituting equations (3,4) into (1) results in \begin{align*}
y &= \frac {-u'}{f_2 u} \\
y &= \frac {-u'}{u \,{\mathrm e}^{k x} a} \\
y &= -\frac {\left (\frac {c_1 k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 c_1 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselJ}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}+\frac {c_2 k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 c_2 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselY}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) {\mathrm e}^{-k x}}{a \left (c_1 \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )+c_2 \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )} \\
\end{align*}
Doing change of constants, the above solution becomes \[
y = -\frac {\left (\frac {k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselJ}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}+\frac {c_3 k \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2}+\frac {2 c_3 \,{\mathrm e}^{\frac {k x}{2}} \left (-\operatorname {BesselY}\left (1-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )-\frac {k \,{\mathrm e}^{-\frac {x \left (k +s \right )}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )}{2 \sqrt {b}\, \sqrt {a}}\right ) \sqrt {b}\, \sqrt {a}\, \left (\frac {k}{2}+\frac {s}{2}\right ) {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) {\mathrm e}^{-k x}}{a \left ({\mathrm e}^{\frac {k x}{2}} \operatorname {BesselJ}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )+c_3 \,{\mathrm e}^{\frac {k x}{2}} \operatorname {BesselY}\left (-\frac {k}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )}
\]
Simplifying the above gives
\begin{align*}
y &= -\frac {b \,{\mathrm e}^{s x} \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_3 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )}{\operatorname {BesselJ}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}+\operatorname {BesselY}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}} c_3 -s \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_3 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -\frac {b \,{\mathrm e}^{s x} \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_3 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )}{\operatorname {BesselJ}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}+\operatorname {BesselY}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}} c_3 -s \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_3 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )} \\
\end{align*}
2.3.9.2 ✓ Maple. Time used: 0.001 (sec). Leaf size: 228
ode:=diff(y(x),x) = a*exp(k*x)*y(x)^2+b*exp(s*x);
dsolve(ode,y(x), singsol=all);
\[
y = -\frac {b \,{\mathrm e}^{s x} \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_1 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\right )}{\operatorname {BesselJ}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}+\operatorname {BesselY}\left (\frac {k +2 s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}} c_1 -s \left (\operatorname {BesselY}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right ) c_1 +\operatorname {BesselJ}\left (\frac {s}{k +s}, \frac {2 \sqrt {b}\, \sqrt {a}\, {\mathrm e}^{\frac {x \left (k +s \right )}{2}}}{k +s}\right )\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) = k*diff(y(x),x)-a*exp
(k*x)*b*exp(s*x)*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)]
checking if the LODE is missing y
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a \
power @ Moebius
-> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int\
(r(x), dx)) * 2F1([a1, a2], [b1], f)
-> Trying changes of variables to rationalize or make the ODE simpler
trying a quadrature
checking if the LODE has constant coefficients
checking if the LODE is of Euler type
trying a symmetry of the form [xi=0, eta=F(x)]
checking if the LODE is missing y
-> Trying a Liouvillian solution using Kovacics algorithm
<- No Liouvillian solutions exists
-> Trying a solution in terms of special functions:
-> Bessel
<- Bessel successful
<- special function solution successful
Change of variables used:
[x = ln(t)/(k+s)]
Linear ODE actually solved:
b*a*u(t)+(k*s+s^2)*diff(u(t),t)+(k^2*t+2*k*s*t+s^2*t)*diff(diff(u(t\
),t),t) = 0
<- change of variables successful
<- Riccati to 2nd Order successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=a \,{\mathrm e}^{k x} y \left (x \right )^{2}+b \,{\mathrm e}^{s 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 )=a \,{\mathrm e}^{k x} y \left (x \right )^{2}+b \,{\mathrm e}^{s x} \end {array} \]
2.3.9.3 ✓ Mathematica. Time used: 1.542 (sec). Leaf size: 859
ode=D[y[x],x]==a*Exp[k*x]*y[x]^2+b*Exp[s*x];
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} \text {Solution too large to show}\end{align*}
2.3.9.4 ✗ Sympy
from sympy import *
x = symbols("x")
a = symbols("a")
b = symbols("b")
k = symbols("k")
s = symbols("s")
y = Function("y")
ode = Eq(-a*y(x)**2*exp(k*x) - b*exp(s*x) + Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
NotImplementedError : The given ODE -a*y(x)**2*exp(k*x) - b*exp(s*x) + Derivative(y(x), x) cannot be solved by the lie group method