23.1.403 problem 389

Internal problem ID [5010]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 389
Date solved : Tuesday, September 30, 2025 at 11:22:50 AM
CAS classification : [_rational, _Riccati]

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