66.1.25 problem Problem 36

Internal problem ID [13793]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 36
Date solved : Wednesday, March 05, 2025 at 10:16:58 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.058 (sec). Leaf size: 21
ode:=2*x+2*y(x)-1+(x+y(x)-2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x -3 \operatorname {LambertW}\left (-\frac {c_{1} {\mathrm e}^{-\frac {1}{3}+\frac {x}{3}}}{3}\right )-1 \]
Mathematica. Time used: 0.914 (sec). Leaf size: 35
ode=(2*x+2*y[x]-1)+(x+y[x]-2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -3 W\left (-e^{\frac {x}{3}-1+c_1}\right )-x-1 \\ y(x)\to -x-1 \\ \end{align*}
Sympy. Time used: 2.739 (sec). Leaf size: 97
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (x + y(x) - 2)*Derivative(y(x), x) + 2*y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x - 3 W\left (\frac {\sqrt [3]{C_{1} e^{x}}}{3 e^{\frac {1}{3}}}\right ) - 1, \ y{\left (x \right )} = - x - 3 W\left (- \frac {\sqrt [3]{C_{1} e^{x}} \left (1 - \sqrt {3} i\right )}{6 e^{\frac {1}{3}}}\right ) - 1, \ y{\left (x \right )} = - x - 3 W\left (- \frac {\sqrt [3]{C_{1} e^{x}} \left (1 + \sqrt {3} i\right )}{6 e^{\frac {1}{3}}}\right ) - 1\right ] \]