15.3.8 problem 8

Internal problem ID [2901]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 7, page 28
Problem number : 8
Date solved : Sunday, March 30, 2025 at 12:48:52 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x -y+1+\left (x -y-1\right ) y^{\prime }&=0 \end{align*}

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