23.1.171 problem 171

Internal problem ID [4778]
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 : 171
Date solved : Tuesday, September 30, 2025 at 08:34:24 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }&=a \,x^{2 n}+\left (n +b y\right ) y \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 34
ode:=x*diff(y(x),x) = a*x^(2*n)+(n+b*y(x))*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (\frac {x^{n} \sqrt {a}\, \sqrt {b}-c_1 n}{n}\right ) \sqrt {a}\, x^{n}}{\sqrt {b}} \]
Mathematica. Time used: 0.193 (sec). Leaf size: 139
ode=x*D[y[x],x]==a*x^(2*n)+(n+b*y[x])*y[x]; 
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(-a*x**(2*n) + x*Derivative(y(x), x) - (b*y(x) + n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**(2*n) + b*y(x)**2 + n*y(x))/x cannot be solved by the factorable group method