6.5.44 problem 43

Internal problem ID [1668]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 43
Date solved : Tuesday, September 30, 2025 at 04:50:33 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {-x +3 y-14}{x +y-2} \end{align*}
Maple. Time used: 0.086 (sec). Leaf size: 30
ode:=diff(y(x),x) = (-x+3*y(x)-14)/(x+y(x)-2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x +6\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.611 (sec). Leaf size: 144
ode=D[y[x],x]==(-x+3*y[x]-14)/(x+y[x]-2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {2^{2/3} \left (x \log \left (\frac {y(x)-x-6}{y(x)+x-2}\right )-(x+6) \log \left (\frac {x+2}{y(x)+x-2}\right )+6 \log \left (\frac {y(x)-x-6}{y(x)+x-2}\right )+y(x) \left (\log \left (\frac {x+2}{y(x)+x-2}\right )-\log \left (\frac {y(x)-x-6}{y(x)+x-2}\right )+1+\log (2)\right )+x-x \log (6)+x \log (3)-2-\log (64)\right )}{9 (-y(x)+x+6)}=\frac {1}{9} 2^{2/3} \log (x+2)+c_1,y(x)\right ] \]
Sympy. Time used: 0.679 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 3*y(x) + 14)/(x + y(x) - 2) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + e^{C_{1} + W\left (2 \left (x + 2\right ) e^{- C_{1}}\right )} + 6 \]