64.4.24 problem 23(b)

Internal problem ID [13234]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.2 (Separable equations). Exercises page 47
Problem number : 23(b)
Date solved : Wednesday, March 05, 2025 at 09:29:38 PM
CAS classification : [[_homogeneous, `class A`], _exact, _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.085 (sec). Leaf size: 80
ode:=2*x^2+2*x*y(x)+y(x)^2+(2*x*y(x)+x^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-3 c_{1}^{2} x^{2}+\sqrt {3}\, \sqrt {-5 \left (c_{1}^{3} x^{3}-\frac {4}{5}\right ) c_{1} x}}{6 c_{1}^{2} x} \\ y &= \frac {-3 c_{1}^{2} x^{2}-\sqrt {3}\, \sqrt {-5 \left (c_{1}^{3} x^{3}-\frac {4}{5}\right ) c_{1} x}}{6 c_{1}^{2} x} \\ \end{align*}
Mathematica. Time used: 0.829 (sec). Leaf size: 150
ode=(2*x^2+2*x*y[x]+y[x]^2)+(x^2+2*x*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{6} \left (-3 x-\frac {\sqrt {3} \sqrt {-5 x^3+4 e^{3 c_1}}}{\sqrt {x}}\right ) \\ y(x)\to \frac {1}{6} \left (-3 x+\frac {\sqrt {3} \sqrt {-5 x^3+4 e^{3 c_1}}}{\sqrt {x}}\right ) \\ y(x)\to \frac {1}{6} x \left (\frac {\sqrt {15} x^{3/2}}{\sqrt {-x^3}}-3\right ) \\ y(x)\to \frac {\sqrt {\frac {5}{3}} \sqrt {-x^3}}{2 \sqrt {x}}-\frac {x}{2} \\ \end{align*}
Sympy. Time used: 1.837 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2 + 2*x*y(x) + (x**2 + 2*x*y(x))*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (\sqrt {\frac {C_{1}}{x^{3}} - 15} - 3\right )}{6}, \ y{\left (x \right )} = \frac {x \left (- \sqrt {\frac {C_{1}}{x^{3}} - 15} - 3\right )}{6}\right ] \]