23.1.186 problem 186

Internal problem ID [4793]
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 : 186
Date solved : Tuesday, September 30, 2025 at 08:37:48 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }&=a \,x^{m}-b y-c \,x^{n} y^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 164
ode:=x*diff(y(x),x) = a*x^m-b*y(x)-c*x^n*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{-\frac {n}{2}+\frac {m}{2}} \sqrt {-c a}\, \left (\operatorname {BesselY}\left (\frac {b +m}{n +m}, \frac {2 \sqrt {-c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right ) c_1 +\operatorname {BesselJ}\left (\frac {b +m}{n +m}, \frac {2 \sqrt {-c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right )\right )}{c \left (\operatorname {BesselY}\left (\frac {b -n}{n +m}, \frac {2 \sqrt {-c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right ) c_1 +\operatorname {BesselJ}\left (\frac {b -n}{n +m}, \frac {2 \sqrt {-c a}\, x^{\frac {n}{2}+\frac {m}{2}}}{n +m}\right )\right )} \]
Mathematica. Time used: 0.475 (sec). Leaf size: 1549
ode=x*D[y[x],x]==a*x^m-b*y[x]-c*x^n*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\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**m + b*y(x) + c*x**n*y(x)**2 + x*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**m - b*y(x) - c*x**n*y(x)**2)/x cannot be solved by the factorable group method