55.4.17 problem 38

Internal problem ID [13342]
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-2. Equations with power and exponential functions
Problem number : 38
Date solved : Wednesday, October 01, 2025 at 07:45:02 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a \,{\mathrm e}^{-\lambda \,x^{2}} y^{2}+\lambda x y+a \,b^{2} \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 45
ode:=diff(y(x),x) = a*exp(-lambda*x^2)*y(x)^2+lambda*x*y(x)+a*b^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (\frac {b a \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, \sqrt {\lambda }\, x}{2}\right )-2 c_1 \sqrt {\lambda }}{2 \sqrt {\lambda }}\right ) b \,{\mathrm e}^{\frac {\lambda \,x^{2}}{2}} \]
Mathematica. Time used: 0.939 (sec). Leaf size: 63
ode=D[y[x],x]==a*Exp[-\[Lambda]*x^2]*y[x]^2+\[Lambda]*x*y[x]+a*b^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sqrt {b^2} e^{\frac {\lambda x^2}{2}} \tan \left (\frac {\sqrt {\frac {\pi }{2}} a \sqrt {b^2} \text {erf}\left (\frac {\sqrt {\lambda } x}{\sqrt {2}}\right )}{\sqrt {\lambda }}+c_1\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*b**2 - a*y(x)**2*exp(-lambda_*x**2) - lambda_*x*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*b**2 - a*y(x)**2*exp(-lambda_*x**2) - lambda_*x*y(x) + Derivative(y(x), x) cannot be solved by the lie group method