61.19.25 problem 25

Internal problem ID [12215]
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 : 25
Date solved : Monday, March 31, 2025 at 04:37:40 AM
CAS classification : [_Riccati]

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

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

Not solved

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