26.2.1 problem Differential equations with Linear Coefficients. Exercise 8.1, page 69

Internal problem ID [6920]
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.1, page 69
Date solved : Tuesday, September 30, 2025 at 04:05:43 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +2 y-4-\left (2 x -4 y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.016 (sec). Leaf size: 31
ode:=x+2*y(x)-4-(2*x-4*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1-\frac {\tan \left (\operatorname {RootOf}\left (2 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (x -2\right )+2 c_1 \right )\right ) \left (x -2\right )}{2} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 63
ode=(x+2*y[x]-4)-(2*x-4*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \arctan \left (\frac {-2 y(x)-x+4}{x-2 y(x)}\right )+\log \left (\frac {x^2+4 y(x)^2-8 y(x)-4 x+8}{2 (x-2)^2}\right )+2 \log (x-2)+c_1=0,y(x)\right ] \]
Sympy. Time used: 2.422 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (2*x - 4*y(x))*Derivative(y(x), x) + 2*y(x) - 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x - 2 \right )} = C_{1} - \log {\left (\sqrt {\frac {1}{4} + \frac {\left (y{\left (x \right )} - 1\right )^{2}}{\left (x - 2\right )^{2}}} \right )} + \operatorname {atan}{\left (\frac {2 \left (y{\left (x \right )} - 1\right )}{x - 2} \right )} \]