29.23.16 problem 647

Internal problem ID [5238]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 647
Date solved : Tuesday, March 04, 2025 at 08:43:32 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

Maple. Time used: 0.296 (sec). Leaf size: 29
ode:=x*(x^2-x*y(x)-y(x)^2)*diff(y(x),x) = (x^2+x*y(x)-y(x)^2)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = {\mathrm e}^{\operatorname {RootOf}\left (2 \,{\mathrm e}^{\textit {\_Z}} \ln \left (x \right )+{\mathrm e}^{2 \textit {\_Z}}+2 c_{1} {\mathrm e}^{\textit {\_Z}}+\textit {\_Z} \,{\mathrm e}^{\textit {\_Z}}+1\right )} x \]
Mathematica. Time used: 0.191 (sec). Leaf size: 34
ode=x(x^2-x y[x]-y[x]^2)D[y[x],x]==(x^2+x y[x]-y[x]^2)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {x}{y(x)}+\frac {y(x)}{x}+\log \left (\frac {y(x)}{x}\right )+\frac {1}{2}=-2 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.335 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x**2 - x*y(x) - y(x)**2)*Derivative(y(x), x) - (x**2 + x*y(x) - y(x)**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \frac {x}{2 y{\left (x \right )}} - \log {\left (\sqrt {\frac {y{\left (x \right )}}{x}} \right )} - \frac {y{\left (x \right )}}{2 x} \]