7.5.18 problem 18

Internal problem ID [122]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.6 (substitution and exact equations). Problems at page 72
Problem number : 18
Date solved : Saturday, March 29, 2025 at 04:33:26 PM
CAS classification : [[_homogeneous, `class C`], [_Abel, `2nd type`, `class C`], _dAlembert]

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

Maple. Time used: 0.004 (sec). Leaf size: 21
ode:=(x+y(x))*diff(y(x),x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (-c_1 \,{\mathrm e}^{-x -1}\right )-x -1 \]
Mathematica. Time used: 0.027 (sec). Leaf size: 24
ode=(x+y[x])*D[y[x],x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -W\left (c_1 \left (-e^{-x-1}\right )\right )-x-1 \]
Sympy. Time used: 0.604 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x - W\left (C_{1} e^{- x - 1}\right ) - 1 \]