74.4.63 problem 60 (b)

Internal problem ID [15877]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.2, page 39
Problem number : 60 (b)
Date solved : Thursday, March 13, 2025 at 06:55:40 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x -y+2}{2 x -2 y-1} \end{align*}

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