87.6.19 problem 22

Internal problem ID [23336]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 53
Problem number : 22
Date solved : Thursday, October 02, 2025 at 09:38:31 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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