61.2.40 problem 40

Internal problem ID [11967]
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 : 40
Date solved : Sunday, March 30, 2025 at 09:29:43 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.006 (sec). Leaf size: 32
ode:=x*diff(y(x),x) = a*x^n*y(x)^2+m*y(x)-a*b^2*x^(n+2*m); 
dsolve(ode,y(x), singsol=all);
 
\[ y = i \tan \left (\frac {c_1 \left (m +n \right )+i a b \,x^{m +n}}{m +n}\right ) b \,x^{m} \]
Mathematica. Time used: 5.825 (sec). Leaf size: 43
ode=x*D[y[x],x]==a*x^n*y[x]^2+m*y[x]-a*b^2*x^(n+2*m); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sqrt {-b^2} x^m \tan \left (\frac {a \sqrt {-b^2} x^{m+n}}{m+n}+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(a*b**2*x**(2*m + n) - a*x**n*y(x)**2 - m*y(x) + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-a*b**2*x**(2*m + n) + a*x**n*y(x)**2 + m*y(x))/x cannot be solved by the factorable group method