10.6.10 problem 10

Internal problem ID [1227]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 10
Date solved : Monday, January 27, 2025 at 04:46:00 AM
CAS classification : [_separable]

\begin{align*} \frac {-x^{2}+x +1}{x^{2}}+\frac {y y^{\prime }}{-2+y}&=0 \end{align*}

Solution by Maple

Time used: 0.019 (sec). Leaf size: 26

dsolve((-x^2+x+1)/x^2+y(x)*diff(y(x),x)/(-2+y(x)) = 0,y(x), singsol=all)
 
\[ y = 2 \operatorname {LambertW}\left (\frac {c_1 \,{\mathrm e}^{\frac {\left (x -1\right )^{2}}{2 x}}}{2 \sqrt {x}}\right )+2 \]

Solution by Mathematica

Time used: 50.341 (sec). Leaf size: 68

DSolve[(-x^2+x+1)/x^2+y[x]*D[y[x],x]/(-2+y[x]) == 0,y[x],x,IncludeSingularSolutions -> True]
 
\begin{align*} y(x)\to 2 \left (1+W\left (-\frac {1}{2} \sqrt {\frac {e^{x+\frac {1}{x}-2+c_1}}{x}}\right )\right ) \\ y(x)\to 2 \left (1+W\left (\frac {1}{2} \sqrt {\frac {e^{x+\frac {1}{x}-2+c_1}}{x}}\right )\right ) \\ y(x)\to 2 \\ \end{align*}