29.2.9 problem 9

Internal problem ID [7236]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 2. Separable equations. page 398
Problem number : 9
Date solved : Tuesday, September 30, 2025 at 04:26:03 PM
CAS classification : [_quadrature]

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

With initial conditions

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