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 : Wednesday, March 05, 2025 at 03:14:42 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.003 (sec). Leaf size: 235
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 (-2 \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}+1, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}}}{m}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}+1, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}}}{m}\right )\right ) \sqrt {a c}\, x^{\frac {m}{2}}+\left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}}}{m}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}}}{m}\right )\right ) \left (\sqrt {-4 a d +n^{2}}+n \right )\right ) x^{-n}}{2 a \left (\operatorname {BesselY}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}, \frac {2 \sqrt {a c}\, x^{\frac {m}{2}}}{m}\right ) c_{1} +\operatorname {BesselJ}\left (\frac {\sqrt {-4 a d +n^{2}}}{m}, \frac {2 \sqrt {a c}\, 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