29.20.4 problem 549

Internal problem ID [5145]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 549
Date solved : Sunday, March 30, 2025 at 06:45:05 AM
CAS classification : [[_homogeneous, `class A`], _exact, _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} x \left (x -2 y\right ) y^{\prime }+\left (2 x -y\right ) y&=0 \end{align*}

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