28.1.27 problem 27

Internal problem ID [4333]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 27
Date solved : Sunday, March 30, 2025 at 03:03:06 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

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