56.12.21 problem Ex 22

Internal problem ID [14148]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 19. Summary. Page 29
Problem number : Ex 22
Date solved : Sunday, October 12, 2025 at 05:28:27 AM
CAS classification : [_rational]

\begin{align*} \left (x^{2}+y^{2}\right ) \left (x +y y^{\prime }\right )&=\left (x^{2}+y^{2}+x \right ) \left (x y^{\prime }-y\right ) \end{align*}
Maple. Time used: 0.098 (sec). Leaf size: 45
ode:=(x^2+y(x)^2)*(x+y(x)*diff(y(x),x)) = (x^2+y(x)^2+x)*(-y(x)+x*diff(y(x),x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x \cot \left (\operatorname {RootOf}\left (-2 \textit {\_Z} +2 \ln \left (2 x^{2} \csc \left (\textit {\_Z} \right )^{2}+\cot \left (\textit {\_Z} \right ) x +x \right )-\ln \left (x^{2} \csc \left (\textit {\_Z} \right )^{2}\right )+2 c_1 \right )\right ) \]
Mathematica. Time used: 0.301 (sec). Leaf size: 53
ode=(x^2+y[x]^2)*(x+y[x]*D[y[x],x])==(x^2+y[x]^2+x)*(x*D[y[x],x]-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} \arctan \left (\frac {x}{y(x)}\right )-\frac {1}{4} \log \left (x^2+y(x)^2\right )+\frac {1}{2} \log \left (2 x^2+2 y(x)^2-y(x)+x\right )=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x)*Derivative(y(x), x))*(x**2 + y(x)**2) - (x*Derivative(y(x), x) - y(x))*(x**2 + x + y(x)**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out