83.4.4 problem 4

Internal problem ID [19005]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (C) at page 12
Problem number : 4
Date solved : Monday, March 31, 2025 at 06:31:21 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

Maple. Time used: 0.237 (sec). Leaf size: 64
ode:=(x^2+y(x)^2)*diff(y(x),x) = x^2+x*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\sqrt {3}\, \tan \left (\operatorname {RootOf}\left (\sqrt {3}\, \ln \left (x^{6} \left (\sqrt {3}\, \sin \left (\textit {\_Z} \right )-3 \cos \left (\textit {\_Z} \right )\right )^{4} \sec \left (\textit {\_Z} \right )^{6}\right )+\sqrt {3}\, \ln \left (3\right )-6 \sqrt {3}\, \ln \left (2\right )+6 \sqrt {3}\, c_1 -6 \textit {\_Z} \right )\right )-1\right )}{2} \]
Mathematica. Time used: 0.187 (sec). Leaf size: 86
ode=(x^2+y[x]^2)*D[y[x],x]==x^2+x*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {\arctan \left (\frac {\frac {2 y(x)}{x}+1}{\sqrt {3}}\right )}{\sqrt {3}}+\frac {1}{3} \log \left (1-\frac {y(x)^3}{x^3}\right )-\frac {1}{6} \log \left (\frac {y(x)^2}{x^2}+\frac {y(x)}{x}+1\right )+\frac {1}{3} \log \left (1-\frac {y(x)}{x}\right )=-\log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 2.868 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - x*y(x) + (x**2 + y(x)**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\left (-1 + \frac {y{\left (x \right )}}{x}\right )^{\frac {2}{3}} \sqrt [6]{1 + \frac {y{\left (x \right )}}{x} + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} + \frac {\sqrt {3} \operatorname {atan}{\left (\frac {\sqrt {3} \left (1 + \frac {2 y{\left (x \right )}}{x}\right )}{3} \right )}}{3} \]