61.3.12 problem 12

Internal problem ID [12017]
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 : 12
Date solved : Sunday, March 30, 2025 at 10:16:49 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a \,{\mathrm e}^{\mu x} y^{2}+\lambda y-a \,b^{2} {\mathrm e}^{\left (\mu +2 \lambda \right ) x} \end{align*}

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