26.2.14 problem Differential equations with Linear Coefficients. Exercise 8.14, page 69

Internal problem ID [6933]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 8
Problem number : Differential equations with Linear Coefficients. Exercise 8.14, page 69
Date solved : Tuesday, September 30, 2025 at 04:06:51 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +y+2-\left (x -y-4\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 31
ode:=x+y(x)+2-(x-y(x)-4)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -3-\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.034 (sec). Leaf size: 58
ode=(x+y[x]+2)-(x-y[x]-4)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \arctan \left (\frac {y(x)+x+2}{y(x)-x+4}\right )+\log \left (\frac {x^2+y(x)^2+6 y(x)-2 x+10}{2 (x-1)^2}\right )+2 \log (x-1)+c_1=0,y(x)\right ] \]
Sympy. Time used: 2.272 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - y(x) - 4)*Derivative(y(x), x) + y(x) + 2,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 )} + 3\right )^{2}}{\left (x - 1\right )^{2}}} \right )} + \operatorname {atan}{\left (\frac {y{\left (x \right )} + 3}{x - 1} \right )} \]