69.12.20 problem 294

Internal problem ID [18173]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 294
Date solved : Thursday, October 02, 2025 at 03:06:58 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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