23.1.279 problem 273

Internal problem ID [4886]
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 : 273
Date solved : Tuesday, September 30, 2025 at 08:54:12 AM
CAS classification : [[_homogeneous, `class D`], _rational, _Bernoulli]

\begin{align*} x^{2} y^{\prime }+\left (x^{2}+y^{2}-x \right ) y&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 32
ode:=x^2*diff(y(x),x)+(x^2+y(x)^2-x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {x}{\sqrt {c_1 \,{\mathrm e}^{2 x}-1}} \\ y &= -\frac {x}{\sqrt {c_1 \,{\mathrm e}^{2 x}-1}} \\ \end{align*}
Mathematica. Time used: 3.847 (sec). Leaf size: 47
ode=x^2*D[y[x],x]+(x^2+y[x]^2-x)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {x}{\sqrt {-1+c_1 e^{2 x}}}\\ y(x)&\to \frac {x}{\sqrt {-1+c_1 e^{2 x}}}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.700 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + (x**2 - x + y(x)**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x \sqrt {\frac {1}{C_{1} e^{2 x} - 1}}, \ y{\left (x \right )} = x \sqrt {\frac {1}{C_{1} e^{2 x} - 1}}\right ] \]