55.19.19 problem 19

Internal problem ID [13504]
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.8-1. Equations containing arbitrary functions (but not containing their derivatives).
Problem number : 19
Date solved : Wednesday, October 01, 2025 at 03:33:29 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=f \left (x \right ) y^{2}-a \,{\mathrm e}^{\lambda x} g \left (x \right ) y+a \lambda \,{\mathrm e}^{\lambda x}+a^{2} {\mathrm e}^{2 \lambda x} \left (g \left (x \right )-f \left (x \right )\right ) \end{align*}
Maple
ode:=diff(y(x),x) = y(x)^2*f(x)-a*exp(lambda*x)*g(x)*y(x)+a*lambda*exp(lambda*x)+a^2*exp(2*lambda*x)*(g(x)-f(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=D[y[x],x]==f[x]*y[x]^2-a*Exp[\[Lambda]*x]*g[x]*y[x]+a*\[Lambda]*Exp[\[Lambda]*x]+a^2*Exp[2*\[Lambda]*x]*(g[x]-f[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
lambda_ = symbols("lambda_") 
y = Function("y") 
f = Function("f") 
g = Function("g") 
ode = Eq(-a**2*(-f(x) + g(x))*exp(2*lambda_*x) - a*lambda_*exp(lambda_*x) + a*g(x)*y(x)*exp(lambda_*x) - f(x)*y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2*f(x)*exp(2*lambda_*x) - a**2*g(x)*exp(2*lambda_*x) - a*lambda_*exp(lambda_*x) + a*g(x)*y(x)*exp(lambda_*x) - f(x)*y(x)**2 + Derivative(y(x), x) cannot be solved by the factorable group method