89.10.3 problem 3

Internal problem ID [24496]
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 : 3
Date solved : Thursday, October 02, 2025 at 10:42:46 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +3 y-5-\left (x -y-1\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.053 (sec). Leaf size: 32
ode:=x+3*y(x)-5-(x-y(x)-1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x +3\right ) \operatorname {LambertW}\left (2 c_1 \left (x -2\right )\right )-2 x +4}{\operatorname {LambertW}\left (2 c_1 \left (x -2\right )\right )} \]
Mathematica. Time used: 0.596 (sec). Leaf size: 148
ode=( x+3*y[x]-5 )-( x-y[x]-1  )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {2^{2/3} \left (x \log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )-(x-3) \log \left (\frac {x-2}{-y(x)+x-1}\right )-3 \log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )-y(x) \left (\log \left (\frac {x-2}{-y(x)+x-1}\right )-\log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )+1+\log (2)\right )+x-x \log (6)+x \log (3)-1+\log (8)\right )}{9 (y(x)+x-3)}=\frac {1}{9} 2^{2/3} \log (x-2)+c_1,y(x)\right ] \]
Sympy. Time used: 0.705 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - y(x) - 1)*Derivative(y(x), x) + 3*y(x) - 5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + e^{C_{1} + W\left (2 \left (2 - x\right ) e^{- C_{1}}\right )} + 3 \]