89.8.1 problem 1

Internal problem ID [24461]
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 66
Problem number : 1
Date solved : Thursday, October 02, 2025 at 10:38:59 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y-2-\left (x -y-1\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 24
ode:=y(x)-2-(x-y(x)-1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {3-x}{\operatorname {LambertW}\left (-\left (-3+x \right ) {\mathrm e}^{-c_1}\right )}+2 \]
Mathematica. Time used: 0.07 (sec). Leaf size: 34
ode=( y[x]-2 )-( x-y[x]-1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=(y(x)-2) \left (\frac {3}{y(x)-2}-\log (y(x)-2)\right )+c_1 (y(x)-2),y(x)\right ] \]
Sympy. Time used: 0.620 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x - y(x) - 1)*Derivative(y(x), x) + y(x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{C_{1} + W\left (\left (3 - x\right ) e^{- C_{1}}\right )} + 2 \]