83.4.1 problem 1

Internal problem ID [19002]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (C) at page 12
Problem number : 1
Date solved : Monday, March 31, 2025 at 06:31:12 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.022 (sec). Leaf size: 18
ode:=(-1+x+y(x))*diff(y(x),x) = x+y(x)+1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (-{\mathrm e}^{-2 x} c_1 \right )-x \]
Mathematica. Time used: 3.89 (sec). Leaf size: 30
ode=(x+y[x]-1)*D[y[x],x]==x+y[x]+1; 
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.798 (sec). Leaf size: 14
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 ) \]