29.23.17 problem 648

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

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

Maple. Time used: 0.049 (sec). Leaf size: 43
ode:=x*(x^2+a*x*y(x)+y(x)^2)*diff(y(x),x) = (x^2+b*x*y(x)+y(x)^2)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = {\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{\textit {\_Z}} a \ln \left (x \right )-\ln \left (x \right ) b \,{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{\textit {\_Z}} c_{1} a -c_{1} b \,{\mathrm e}^{\textit {\_Z}}+\textit {\_Z} a \,{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{2 \textit {\_Z}}-1\right )} x \]
Mathematica. Time used: 0.261 (sec). Leaf size: 38
ode=x(x^2+a x y[x]+y[x]^2)D[y[x],x]==(x^2+b x y[x]+y[x]^2)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [a \log \left (\frac {y(x)}{x}\right )-\frac {x}{y(x)}+\frac {y(x)}{x}=(b-a) \log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(x*(a*x*y(x) + x**2 + y(x)**2)*Derivative(y(x), x) - (b*x*y(x) + x**2 + y(x)**2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational