20.1.8 problem 5.a

Internal problem ID [4248]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 7, page 37
Problem number : 5.a
Date solved : Tuesday, September 30, 2025 at 07:08:43 AM
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.012 (sec). Leaf size: 31
ode:=diff(y(x),x) = (x+y(x)+4)/(x-y(x)-6); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -5-\tan \left (\operatorname {RootOf}\left (2 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (x -1\right )+2 c_1 \right )\right ) \left (x -1\right ) \]
Mathematica. Time used: 0.035 (sec). Leaf size: 58
ode=D[y[x],x]==(x+y[x]+4)/(x-y[x]-6); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \arctan \left (\frac {y(x)+x+4}{y(x)-x+6}\right )+\log \left (\frac {x^2+y(x)^2+10 y(x)-2 x+26}{2 (x-1)^2}\right )+2 \log (x-1)+c_1=0,y(x)\right ] \]
Sympy. Time used: 1.538 (sec). Leaf size: 34
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)
 
\[ \log {\left (x - 1 \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {\left (y{\left (x \right )} + 5\right )^{2}}{\left (x - 1\right )^{2}}} \right )} + \operatorname {atan}{\left (\frac {y{\left (x \right )} + 5}{x - 1} \right )} \]