55.2.28 problem 28

Internal problem ID [13254]
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 : 28
Date solved : Wednesday, October 01, 2025 at 04:34:23 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=y^{2}+a \,x^{n} y-a b \,x^{n}-b^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 59
ode:=diff(y(x),x) = y(x)^2+a*x^n*y(x)-a*b*x^n-b^2; 
dsolve(ode,y(x), singsol=all);
 
\[ c_1 +\int _{}^{x}{\mathrm e}^{\frac {\left (a \,\textit {\_a}^{n}+2 b \left (n +1\right )\right ) \textit {\_a}}{n +1}}d \textit {\_a} -\frac {{\mathrm e}^{\frac {\left (x^{n} a +2 b \left (n +1\right )\right ) x}{n +1}}}{b -y} = 0 \]
Mathematica. Time used: 0.446 (sec). Leaf size: 195
ode=D[y[x],x]==y[x]^2+a*x^n*y[x]-a*b*x^n-b^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{y(x)}\left (\frac {e^{\frac {a x^{n+1}}{n+1}+2 b x}}{a n (K[2]-b)^2}-\int _1^x\left (\frac {e^{\frac {a K[1]^{n+1}}{n+1}+2 b K[1]} \left (a K[1]^n+b+K[2]\right )}{a n (b-K[2])^2}+\frac {e^{\frac {a K[1]^{n+1}}{n+1}+2 b K[1]}}{a n (b-K[2])}\right )dK[1]\right )dK[2]+\int _1^x\frac {e^{\frac {a K[1]^{n+1}}{n+1}+2 b K[1]} \left (a K[1]^n+b+y(x)\right )}{a n (b-y(x))}dK[1]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
n = symbols("n") 
y = Function("y") 
ode = Eq(a*b*x**n - a*x**n*y(x) + b**2 - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a*b*x**n - a*x**n*y(x) + b**2 - y(x)**2 + Derivative(y(x), x) cannot be solved by the lie group method