89.10.17 problem 17

Internal problem ID [24510]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 77
Problem number : 17
Date solved : Thursday, October 02, 2025 at 10:43:57 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +y-2-\left (x -4 y-2\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 28
ode:=x+y(x)-2-(x-4*y(x)-2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\frac {x}{2}+1\right ) \tan \left (\operatorname {RootOf}\left (\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+\textit {\_Z} +2 \ln \left (x -2\right )+2 c_1 \right )\right ) \]
Mathematica. Time used: 0.036 (sec). Leaf size: 54
ode=( x+y[x]-2 )- ( x-4*y[x]-2 )*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-2)}{-4 y(x)+x-2}\right )=2 \log \left (\frac {4}{5} \left (\frac {4 y(x)^2}{(x-2)^2}+1\right )\right )+4 \log (x-2)+5 c_1,y(x)\right ] \]
Sympy. Time used: 1.004 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x - (x - 4*y(x) - 2)*Derivative(y(x), x) + y(x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (y{\left (x \right )} \right )} = C_{1} - \log {\left (\sqrt {\frac {\left (x - 2\right )^{2}}{y^{2}{\left (x \right )}} + 4} \right )} - \frac {\operatorname {atan}{\left (\frac {x - 2}{2 y{\left (x \right )}} \right )}}{2} \]