61.2.37 problem 37

Internal problem ID [11964]
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 : 37
Date solved : Wednesday, March 05, 2025 at 03:16:47 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 139
ode:=x*diff(y(x),x) = x*y(x)^2+a*y(x)+b*x^n; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{\frac {n}{2}-\frac {1}{2}} \sqrt {b}\, \left (\operatorname {BesselY}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {-a +n}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )\right )}{\operatorname {BesselY}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {-a -1}{n +1}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}+\frac {1}{2}}}{n +1}\right )} \]
Mathematica. Time used: 0.688 (sec). Leaf size: 855
ode=x*D[y[x],x]==x*y[x]^2+a*y[x]+b*x^n; 
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") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-a*y(x) - b*x**n - x*y(x)**2 + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*y(x) + b*x**n + x*y(x)**2)/x cannot be solved by the factorable group method