32.2.9 problem Differential equations with Linear Coefficients. Exercise 8.9, page 69

Internal problem ID [5793]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 8
Problem number : Differential equations with Linear Coefficients. Exercise 8.9, page 69
Date solved : Tuesday, March 04, 2025 at 11:45:22 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.756 (sec). Leaf size: 30
ode:=x+2*y(x)+(-1+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\left (-x -1\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: 1.165 (sec). Leaf size: 143
ode=(x+2*y[x])+(y[x]-1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {(-2)^{2/3} \left (-\left ((x+1) \log \left (-\frac {3 (-2)^{2/3} (x+2)}{y(x)-1}\right )\right )+x \log \left (\frac {3 (-2)^{2/3} (y(x)+x+1)}{y(x)-1}\right )+\log \left (\frac {3 (-2)^{2/3} (y(x)+x+1)}{y(x)-1}\right )+y(x) \left (-\log \left (-\frac {3 (-2)^{2/3} (x+2)}{y(x)-1}\right )+\log \left (\frac {3 (-2)^{2/3} (y(x)+x+1)}{y(x)-1}\right )-1\right )+1\right )}{9 (y(x)+x+1)}=\frac {1}{9} (-2)^{2/3} \log (x+2)+c_1,y(x)\right ] \]
Sympy. Time used: 0.925 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + (y(x) - 1)*Derivative(y(x), x) + 2*y(x),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 )} - 1 \]