61.2.21 problem 21

Internal problem ID [11948]
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 : 21
Date solved : Sunday, March 30, 2025 at 09:25:56 PM
CAS classification : [_Riccati]

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

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