61.2.31 problem 31

Internal problem ID [11958]
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 : 31
Date solved : Wednesday, March 05, 2025 at 03:16:04 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=a \,x^{n} y^{2}-a \,x^{n} \left (b \,x^{m}+c \right ) y+b m \,x^{m -1} \end{align*}

Maple
ode:=diff(y(x),x) = a*x^n*y(x)^2-a*x^n*(b*x^m+c)*y(x)+b*m*x^(m-1); 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 49.673 (sec). Leaf size: 353
ode=D[y[x],x]==a*x^n*y[x]^2-a*x^n*(b*x^m+c)*y[x]+b*m*x^(m-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {b m \left (b x^m+c\right )^2 \left (1+c_1 \int _1^x\frac {\exp \left (a K[1]^{n+1} \left (\frac {b K[1]^m}{m+n+1}+\frac {c}{n+1}\right )\right ) K[1]^{m-1}}{\left (b K[1]^m+c\right )^2}dK[1]\right )}{b c_1 m \left (b x^m+c\right ) \int _1^x\frac {\exp \left (a K[1]^{n+1} \left (\frac {b K[1]^m}{m+n+1}+\frac {c}{n+1}\right )\right ) K[1]^{m-1}}{\left (b K[1]^m+c\right )^2}dK[1]+c_1 e^{a x^{n+1} \left (\frac {b x^m}{m+n+1}+\frac {c}{n+1}\right )}+b^2 m x^m+b c m} \\ y(x)\to \frac {b m \left (b x^m+c\right )^2 \int _1^x\frac {\exp \left (a K[1]^{n+1} \left (\frac {b K[1]^m}{m+n+1}+\frac {c}{n+1}\right )\right ) K[1]^{m-1}}{\left (b K[1]^m+c\right )^2}dK[1]}{b m \left (b x^m+c\right ) \int _1^x\frac {\exp \left (a K[1]^{n+1} \left (\frac {b K[1]^m}{m+n+1}+\frac {c}{n+1}\right )\right ) K[1]^{m-1}}{\left (b K[1]^m+c\right )^2}dK[1]+e^{a x^{n+1} \left (\frac {b x^m}{m+n+1}+\frac {c}{n+1}\right )}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(a*x**n*(b*x**m + c)*y(x) - a*x**n*y(x)**2 - b*m*x**(m - 1) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a*b*x**(m + n)*y(x) + a*c*x**n*y(x) - a*x**n*y(x)**2 - b*m*x**(m - 1) + Derivative(y(x), x) cannot be solved by the factorable group method