47.2.35 problem 33

Internal problem ID [7451]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 33
Date solved : Sunday, March 30, 2025 at 12:07:22 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.077 (sec). Leaf size: 32
ode:=diff(y(x),x) = (x+3*y(x)-5)/(x-y(x)-1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x +3\right ) \operatorname {LambertW}\left (2 c_1 \left (x -2\right )\right )-2 x +4}{\operatorname {LambertW}\left (2 c_1 \left (x -2\right )\right )} \]
Mathematica. Time used: 0.964 (sec). Leaf size: 148
ode=D[y[x],x]==(x+3*y[x]-5)/(x-y[x]-1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {2^{2/3} \left (x \log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )-(x-3) \log \left (\frac {x-2}{-y(x)+x-1}\right )-3 \log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )-y(x) \left (\log \left (\frac {x-2}{-y(x)+x-1}\right )-\log \left (-\frac {y(x)+x-3}{-y(x)+x-1}\right )+1+\log (2)\right )+x-x \log (6)+x \log (3)-1+\log (8)\right )}{9 (y(x)+x-3)}=\frac {1}{9} 2^{2/3} \log (x-2)+c_1,y(x)\right ] \]
Sympy. Time used: 1.256 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x + 3*y(x) - 5)/(x - y(x) - 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - x + e^{C_{1} + W\left (2 \left (2 - x\right ) e^{- C_{1}}\right )} + 3 \]