61.3.16 problem 16

Internal problem ID [12021]
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 : 16
Date solved : Wednesday, March 05, 2025 at 03:51:57 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a \,{\mathrm e}^{k x} y^{2}+b y+c \,{\mathrm e}^{s x}+d \,{\mathrm e}^{-k x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 336
ode:=diff(y(x),x) = a*exp(k*x)*y(x)^2+b*y(x)+c*exp(s*x)+d*exp(-k*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-k x} \left (-2 a \sqrt {c}\, \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}+s +k}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}+s +k}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right )\right ) {\mathrm e}^{\frac {x \left (s +k \right )}{2}}+\sqrt {a}\, \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right )\right ) \left (\sqrt {-4 a d +b^{2}+2 b k +k^{2}}+b +k \right )\right )}{a^{{3}/{2}} \left (2 \operatorname {BesselY}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right ) c_{1} +2 \operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +b^{2}+2 b k +k^{2}}}{s +k}, \frac {2 \sqrt {a}\, \sqrt {c}\, {\mathrm e}^{\frac {x \left (s +k \right )}{2}}}{s +k}\right )\right )} \]
Mathematica. Time used: 8.249 (sec). Leaf size: 1636
ode=D[y[x],x]==a*Exp[k*x]*y[x]^2+b*y[x]+c*Exp[s*x]+d*Exp[-k*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
k = symbols("k") 
s = symbols("s") 
y = Function("y") 
ode = Eq(-a*y(x)**2*exp(k*x) - b*y(x) - c*exp(s*x) - d*exp(-k*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*y(x) - c*exp(s*x) - d*exp(-k*x) + Derivative(y(x), x) cannot be solved by the lie group method