85.12.5 problem 5

Internal problem ID [22499]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 40
Problem number : 5
Date solved : Thursday, October 02, 2025 at 08:42:57 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class C`], _dAlembert]

\begin{align*} x +2+\left (2 x +y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.054 (sec). Leaf size: 30
ode:=x+2+(y(x)+2*x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x +2\right ) \operatorname {LambertW}\left (-c_1 \left (x +2\right )\right )+x +2}{\operatorname {LambertW}\left (-c_1 \left (x +2\right )\right )} \]
Mathematica. Time used: 0.537 (sec). Leaf size: 127
ode=(x+2)+(2*x+y[x])*D[y[x],x]== 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {2^{2/3} \left (x \left (-\log \left (\frac {y(x)+x-2}{y(x)+2 x}\right )\right )+(x-2) \log \left (\frac {x+2}{y(x)+2 x}\right )+2 \log \left (\frac {y(x)+x-2}{y(x)+2 x}\right )+y(x) \left (\log \left (\frac {x+2}{y(x)+2 x}\right )-\log \left (\frac {y(x)+x-2}{y(x)+2 x}\right )+1\right )+2 x\right )}{9 (y(x)+x-2)}=\frac {1}{9} 2^{2/3} \log (x+2)+c_1,y(x)\right ] \]
Sympy. Time used: 0.572 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + (2*x + y(x))*Derivative(y(x), x) + 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + e^{C_{1} + W\left (\left (x + 2\right ) e^{- C_{1}}\right )} + 2 \]