23.1.643 problem 637

Internal problem ID [5250]
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 : 637
Date solved : Tuesday, September 30, 2025 at 12:00:17 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} \left (x^{2}+x y+a y^{2}\right ) y^{\prime }&=a \,x^{2}+x y+y^{2} \end{align*}
Maple. Time used: 0.088 (sec). Leaf size: 103
ode:=(x^2+x*y(x)+a*y(x)^2)*diff(y(x),x) = x^2*a+x*y(x)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {\left (-a +1\right ) \operatorname {RootOf}\left ({\mathrm e}^{\textit {\_Z}}-x^{-\frac {6 a}{2+a}} {\mathrm e}^{-\frac {2 \left (3 c_1 a +\textit {\_Z} a -\textit {\_Z} \right )}{2+a}}-3 x^{-\frac {3 a}{2+a}} {\mathrm e}^{-\frac {3 c_1 a +\textit {\_Z} a -\textit {\_Z}}{2+a}}-3\right )-3 c_1 a}{2+a}} x^{-\frac {3 a}{2+a}} x +x \]
Mathematica. Time used: 0.137 (sec). Leaf size: 54
ode=(x^2+x y[x]+a y[x]^2)D[y[x],x]==a x^2+x y[x]+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{3} (a-1) \log \left (\frac {y(x)^2}{x^2}+\frac {y(x)}{x}+1\right )+\frac {1}{3} (a+2) \log \left (1-\frac {y(x)}{x}\right )=-a \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 40.505 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x**2 - x*y(x) + (a*y(x)**2 + x**2 + x*y(x))*Derivative(y(x), x) - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt [3]{\left (-1 + \frac {y{\left (x \right )}}{x}\right )^{\frac {a + 2}{a}}} \sqrt [3]{\left (1 + \frac {y{\left (x \right )}}{x} + \frac {y^{2}{\left (x \right )}}{x^{2}}\right )^{\frac {a - 1}{a}}} \right )} \]