61.2.28 problem 28

Internal problem ID [11955]
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 : Friday, March 14, 2025 at 03:20:02 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.005 (sec). Leaf size: 74
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);
 
\[ \frac {\left (-y+b \right ) \left (\int _{}^{x}{\mathrm e}^{\frac {\textit {\_a} \left (\textit {\_a}^{n} a +2 b \left (n +1\right )\right )}{n +1}}d \textit {\_a} \right )+c_{1} b -c_{1} y-{\mathrm e}^{\frac {x \left (a \,x^{n}+2 b \left (n +1\right )\right )}{n +1}}}{-y+b} = 0 \]
Mathematica. Time used: 0.725 (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