89.10.23 problem 23

Internal problem ID [24516]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 77
Problem number : 23
Date solved : Thursday, October 02, 2025 at 10:44:45 PM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} 1+\left (x +y\right )^{2}+\left (1+x \left (x +y\right )\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 27
ode:=1+(x+y(x))^2+(1+x*(x+y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-x^{2}+\operatorname {LambertW}\left (-2 x c_1 \,{\mathrm e}^{-1+\frac {x^{2}}{2}}\right )}{x} \]
Mathematica. Time used: 3.97 (sec). Leaf size: 64
ode=(1+(x+y[x])^2 )+(1+x*(x+y[x]) )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x+\frac {W\left (x \left (-e^{\frac {x^2}{2}-1+c_1}\right )\right )}{x}\\ y(x)&\to -x\\ y(x)&\to \frac {W\left (-e^{\frac {x^2}{2}-1} x\right )}{x}-x \end{align*}
Sympy. Time used: 0.907 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))**2 + (x*(x + y(x)) + 1)*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + \frac {W\left (C_{1} x \sqrt {e^{x^{2}}}\right )}{x} \]