55.19.8 problem 8

Internal problem ID [13493]
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 : 8
Date solved : Wednesday, October 01, 2025 at 03:32:29 PM
CAS classification : [_Riccati]

\begin{align*} x y^{\prime }&=x^{2 n} f \left (x \right ) y^{2}+\left (a \,x^{n} f \left (x \right )-n \right ) y+b f \left (x \right ) \end{align*}
Maple. Time used: 0.018 (sec). Leaf size: 65
ode:=x*diff(y(x),x) = x^(2*n)*f(x)*y(x)^2+(a*x^n*f(x)-n)*y(x)+f(x)*b; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{-n} \left (\tanh \left (\frac {\sqrt {a^{2} \left (a^{2}-4 b \right )}\, \left (a \int f \left (x \right ) x^{-1+n}d x +c_1 \right )}{2 a^{2}}\right ) \sqrt {a^{2} \left (a^{2}-4 b \right )}+a^{2}\right )}{2 a} \]
Mathematica. Time used: 0.694 (sec). Leaf size: 82
ode=x*D[y[x],x]==x^(2*n)*f[x]*y[x]^2+(a*x^n*f[x]-n)*y[x]+b*f[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\sqrt {\frac {x^{2 n}}{b}} y(x)}\frac {1}{K[1]^2-\sqrt {\frac {a^2}{b}} K[1]+1}dK[1]=\int _1^x\frac {b f(K[2]) \sqrt {\frac {K[2]^{2 n}}{b}}}{K[2]}dK[2]+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
f = Function("f") 
ode = Eq(-b*f(x) + x*Derivative(y(x), x) - x**(2*n)*f(x)*y(x)**2 - (a*x**n*f(x) - n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**n*f(x)*y(x) + b*f(x) - n*y(x) + x**(2*n)*f(x)*y(x)**2)/x cannot be solved by the factorable group method