61.3.1 problem 1

Internal problem ID [12006]
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 : 1
Date solved : Sunday, March 30, 2025 at 10:15:06 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a y^{2}+b \,{\mathrm e}^{\lambda x} \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 96
ode:=diff(y(x),x) = a*y(x)^2+b*exp(lambda*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sqrt {b}\, {\mathrm e}^{\frac {\lambda x}{2}} \left (\operatorname {BesselY}\left (1, \frac {2 \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {\lambda x}{2}}}{\lambda }\right ) c_1 +\operatorname {BesselJ}\left (1, \frac {2 \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {\lambda x}{2}}}{\lambda }\right )\right )}{\sqrt {a}\, \left (c_1 \operatorname {BesselY}\left (0, \frac {2 \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {\lambda x}{2}}}{\lambda }\right )+\operatorname {BesselJ}\left (0, \frac {2 \sqrt {a}\, \sqrt {b}\, {\mathrm e}^{\frac {\lambda x}{2}}}{\lambda }\right )\right )} \]
Mathematica. Time used: 0.339 (sec). Leaf size: 197
ode=D[y[x],x]==a*y[x]^2+b*Exp[\[Lambda]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt {b e^{\lambda x}} \left (2 \operatorname {BesselY}\left (1,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )+c_1 \operatorname {BesselJ}\left (1,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )\right )}{\sqrt {a} \left (2 \operatorname {BesselY}\left (0,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )+c_1 \operatorname {BesselJ}\left (0,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )\right )} \\ y(x)\to \frac {\sqrt {b e^{\lambda x}} \operatorname {BesselJ}\left (1,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )}{\sqrt {a} \operatorname {BesselJ}\left (0,\frac {2 \sqrt {a} \sqrt {b e^{x \lambda }}}{\lambda }\right )} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(-a*y(x)**2 - b*exp(lambda_*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*y(x)**2 - b*exp(lambda_*x) + Derivative(y(x), x) cannot be solved by the lie group method