61.2.51 problem 51

Internal problem ID [11978]
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 : 51
Date solved : Sunday, March 30, 2025 at 09:31:40 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.004 (sec). Leaf size: 263
ode:=x^2*diff(y(x),x) = a*x^2*y(x)^2+b*x*y(x)+c*x^n+s; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \sqrt {c a}\, \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}+1, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )\right ) x^{\frac {n}{2}}-\left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )\right ) \left (\sqrt {-4 a s +b^{2}+2 b +1}+b +1\right )}{2 x a \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) c_1 +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a s +b^{2}+2 b +1}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )\right )} \]
Mathematica. Time used: 1.475 (sec). Leaf size: 2281
ode=x^2*D[y[x],x]==a*x^2*y[x]^2+b*x*y[x]+c*x^n+s; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

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