86.1.11 problem 11

Internal problem ID [23073]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 3. Some standard types of differential equations. Exercise 3b at page 43
Problem number : 11
Date solved : Thursday, October 02, 2025 at 09:18:53 PM
CAS classification : [_separable]

\begin{align*} x \left (y+2\right )+y \left (x +2\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 25
ode:=x*(y(x)+2)+y(x)*(x+2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -2 \operatorname {LambertW}\left (\frac {c_1 \,{\mathrm e}^{\frac {x}{2}-1}}{-2 x -4}\right )-2 \]
Mathematica. Time used: 60.027 (sec). Leaf size: 65
ode=x*(y[x]+2)+y[x]*(x+2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 \left (1+W\left (-\frac {1}{2} \sqrt {\frac {e^{x-2-c_1}}{(x+2)^2}}\right )\right )\\ y(x)&\to -2 \left (1+W\left (\frac {1}{2} \sqrt {\frac {e^{x-2-c_1}}{(x+2)^2}}\right )\right ) \end{align*}
Sympy. Time used: 0.943 (sec). Leaf size: 63
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(y(x) + 2) + (x + 2)*y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 W\left (- \frac {\sqrt {\frac {C_{1} e^{x}}{x^{2} + 4 x + 4}}}{2 e}\right ) - 2, \ y{\left (x \right )} = - 2 W\left (\frac {\sqrt {\frac {C_{1} e^{x}}{x^{2} + 4 x + 4}}}{2 e}\right ) - 2\right ] \]