44.5.12 problem 4(b)

Internal problem ID [9168]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.7. Homogeneous Equations. Page 28
Problem number : 4(b)
Date solved : Tuesday, September 30, 2025 at 06:11:19 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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