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 : Wednesday, March 05, 2025 at 03:17:07 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.003 (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 {a c}\, \left (\operatorname {BesselY}\left (\frac {-b +m}{m +n}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}+\frac {n}{2}}}{m +n}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {-b +m}{m +n}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}+\frac {n}{2}}}{m +n}\right )\right )}{a \left (\operatorname {BesselY}\left (\frac {-b -n}{m +n}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}+\frac {n}{2}}}{m +n}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {-b -n}{m +n}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}+\frac {n}{2}}}{m +n}\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