61.4.17 problem 38

Internal problem ID [12043]
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 : Sunday, March 30, 2025 at 10:21:01 PM
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)+b^2*a; 
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: 1.401 (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]
 
\[ 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 ) \]
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