35.2.9 problem 9

Internal problem ID [6101]
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 : Wednesday, March 05, 2025 at 12:12:38 AM
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.086 (sec). Leaf size: 7
ode:=(1+y(x))*diff(y(x),x) = y(x); 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \operatorname {LambertW}\left ({\mathrm e}^{x}\right ) \]
Mathematica. Time used: 1.967 (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]
 
\[ y(x)\to W\left (e^x\right ) \]
Sympy. Time used: 0.262 (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 ) \]