23.1.560 problem 550

Internal problem ID [5167]
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 : 550
Date solved : Tuesday, September 30, 2025 at 11:47:23 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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