61.2.4 problem 4

Internal problem ID [11931]
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 : 4
Date solved : Sunday, March 30, 2025 at 09:20:17 PM
CAS classification : [[_Riccati, _special]]

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

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