55.2.41 problem 41

Internal problem ID [13267]
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 : 41
Date solved : Wednesday, October 01, 2025 at 04:54:36 AM
CAS classification : [_rational, _Riccati]

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