72.1.44 problem 4 (f)

Internal problem ID [19385]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 4 (f)
Date solved : Thursday, October 02, 2025 at 04:20:11 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=0 \\ \end{align*}
Maple. Time used: 0.139 (sec). Leaf size: 18
ode:=x*y(x)*diff(y(x),x) = (1+x)*(1+y(x)); 
ic:=[y(1) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -1-\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-x}}{x}\right ) \]
Mathematica. Time used: 4.881 (sec). Leaf size: 20
ode=x*y[x]*D[y[x],x]==(x+1)*(y[x]+1); 
ic={y[1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -W\left (-\frac {e^{-x}}{x}\right )-1 \end{align*}
Sympy. Time used: 0.248 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) - (x + 1)*(y(x) + 1),0) 
ics = {y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - W\left (- \frac {e e^{- x - 1}}{x}\right ) - 1 \]