29.20.2 problem 547

Internal problem ID [5143]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 547
Date solved : Sunday, March 30, 2025 at 06:44:05 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.015 (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: 4.77 (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: 1.234 (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 ] \]