15.8.8 problem 8

Internal problem ID [3011]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 8
Date solved : Sunday, March 30, 2025 at 01:05:48 AM
CAS classification : [_separable]

\begin{align*} 2 y+6&=x y y^{\prime } \end{align*}

Maple. Time used: 0.011 (sec). Leaf size: 20
ode:=2*y(x)+6 = x*y(x)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -3 \operatorname {LambertW}\left (-\frac {{\mathrm e}^{-1-\frac {2 c_1}{3}}}{3 x^{{2}/{3}}}\right )-3 \]
Mathematica. Time used: 18.614 (sec). Leaf size: 106
ode=2*(y[x]+3)==x*y[x]*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -3 \left (1+W\left (\frac {1}{3} \sqrt [3]{-\frac {e^{-3-c_1}}{x^2}}\right )\right ) \\ y(x)\to -3 \left (1+W\left (-\frac {1}{3} \sqrt [3]{-1} \sqrt [3]{-\frac {e^{-3-c_1}}{x^2}}\right )\right ) \\ y(x)\to -3 \left (1+W\left (\frac {1}{3} (-1)^{2/3} \sqrt [3]{-\frac {e^{-3-c_1}}{x^2}}\right )\right ) \\ y(x)\to -3 \\ \end{align*}
Sympy. Time used: 2.090 (sec). Leaf size: 85
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)*Derivative(y(x), x) + 2*y(x) + 6,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 3 W\left (- \frac {\sqrt [3]{\frac {C_{1}}{x^{2}}}}{3 e}\right ) - 3, \ y{\left (x \right )} = - 3 W\left (\frac {\sqrt [3]{\frac {C_{1}}{x^{2}}} \left (1 - \sqrt {3} i\right )}{6 e}\right ) - 3, \ y{\left (x \right )} = - 3 W\left (\frac {\sqrt [3]{\frac {C_{1}}{x^{2}}} \left (1 + \sqrt {3} i\right )}{6 e}\right ) - 3\right ] \]