29.23.15 problem 646

Internal problem ID [5237]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 646
Date solved : Tuesday, March 04, 2025 at 08:41:43 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&=0 \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 22
ode:=x*(x^2-x*y(x)+y(x)^2)*diff(y(x),x)+(x^2+x*y(x)+y(x)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \tan \left (\operatorname {RootOf}\left (\ln \left (\tan \left (\textit {\_Z} \right )\right )-\textit {\_Z} +2 \ln \left (x \right )+2 c_{1} \right )\right ) x \]
Mathematica. Time used: 0.129 (sec). Leaf size: 28
ode=x(x^2-x y[x]+y[x]^2)D[y[x],x]+(x^2+x y[x]+y[x]^2)y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\log \left (\frac {y(x)}{x}\right )-\arctan \left (\frac {y(x)}{x}\right )=-2 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 0.979 (sec). Leaf size: 22
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} - \log {\left (\sqrt {\frac {y{\left (x \right )}}{x}} \right )} + \frac {\operatorname {atan}{\left (\frac {y{\left (x \right )}}{x} \right )}}{2} \]