61.2.42 problem 42

Internal problem ID [11969]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 42
Date solved : Sunday, March 30, 2025 at 09:29:51 PM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }&=a \,x^{n} y^{2}+b y+c \,x^{m} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 166
ode:=x*diff(y(x),x) = a*x^n*y(x)^2+b*y(x)+c*x^m; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{-\frac {n}{2}+\frac {m}{2}} \sqrt {c a}\, \left (\operatorname {BesselY}\left (\frac {-b +m}{n +m}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right ) c_1 +\operatorname {BesselJ}\left (\frac {-b +m}{n +m}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right )\right )}{a \left (\operatorname {BesselY}\left (\frac {-b -n}{n +m}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right ) c_1 +\operatorname {BesselJ}\left (\frac {-b -n}{n +m}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right )\right )} \]
Mathematica. Time used: 0.769 (sec). Leaf size: 1578
ode=x*D[y[x],x]==a*x^(n)*y[x]^2+b*y[x]+c*x^(m); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

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