61.20.6 problem 39

Internal problem ID [12229]
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-2. Equations containing arbitrary functions and their derivatives.
Problem number : 39
Date solved : Monday, March 31, 2025 at 04:39:54 AM
CAS classification : [_Riccati]

\begin{align*} f \left (x \right )^{2} y^{\prime }-f^{\prime }\left (x \right ) y^{2}+g \left (x \right ) \left (y-f \left (x \right )\right )&=0 \end{align*}

Maple
ode:=f(x)^2*diff(y(x),x)-diff(f(x),x)*y(x)^2+g(x)*(y(x)-f(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=f[x]^2*D[y[x],x]-D[ f[x],x]*y[x]^2+g[x]*(y[x]-f[x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

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