61.3.2 problem 2

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

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

Maple. Time used: 0.003 (sec). Leaf size: 63
ode:=diff(y(x),x) = y(x)^2+a*lambda*exp(lambda*x)-a^2*exp(2*lambda*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\operatorname {Ei}_{1}\left (-\frac {2 a \,{\mathrm e}^{\lambda x}}{\lambda }\right ) {\mathrm e}^{\lambda x} c_{1} a +{\mathrm e}^{\frac {2 a \,{\mathrm e}^{\lambda x}}{\lambda }} c_{1} \lambda +{\mathrm e}^{\lambda x} a}{\operatorname {Ei}_{1}\left (-\frac {2 a \,{\mathrm e}^{\lambda x}}{\lambda }\right ) c_{1} +1} \]
Mathematica. Time used: 1.985 (sec). Leaf size: 107
ode=D[y[x],x]==y[x]^2+a*\[Lambda]*Exp[\[Lambda]*x]-a^2*Exp[2*\[Lambda]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {a e^{\lambda x} \int _1^{e^{x \lambda }}\frac {e^{\frac {2 a K[1]}{\lambda }}}{K[1]}dK[1]+\lambda \left (-e^{\frac {2 a e^{\lambda x}}{\lambda }}\right )+a c_1 e^{\lambda x}}{\int _1^{e^{x \lambda }}\frac {e^{\frac {2 a K[1]}{\lambda }}}{K[1]}dK[1]+c_1} \\ y(x)\to a e^{\lambda x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
cg = symbols("cg") 
y = Function("y") 
ode = Eq(a**2*exp(2*cg*x) - a*cg*exp(cg*x) - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2*exp(2*cg*x) - a*cg*exp(cg*x) - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method