62.12.21 problem Ex 22

Internal problem ID [12796]
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 : Monday, March 31, 2025 at 07:08:03 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.484 (sec). Leaf size: 212
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 [\int _1^{y(x)}\left (\frac {-x-K[2]}{2 \left (x^2+K[2]^2\right )}-\int _1^x\left (-\frac {K[2] (K[2]-K[1])}{\left (K[1]^2+K[2]^2\right )^2}+\frac {1}{2 \left (K[1]^2+K[2]^2\right )}-\frac {(4 K[1]+1) (4 K[2]-1)}{2 \left (2 K[1]^2+K[1]+2 K[2]^2-K[2]\right )^2}\right )dK[1]+\frac {4 K[2]-1}{2 \left (2 x^2+x+2 K[2]^2-K[2]\right )}\right )dK[2]+\int _1^x\left (\frac {4 K[1]+1}{2 \left (2 K[1]^2+K[1]+2 y(x)^2-y(x)\right )}+\frac {y(x)-K[1]}{2 \left (K[1]^2+y(x)^2\right )}\right )dK[1]=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