81.5.6 problem 6-6

Internal problem ID [21544]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 6. Method of grouping. Page 96.
Problem number : 6-6
Date solved : Thursday, October 02, 2025 at 07:47:30 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x -2 y}{2 x -y} \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 51
ode:=diff(y(x),x) = (x-2*y(x))/(2*x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {2 c_1 x -\sqrt {3 x^{2} c_1^{2}+1}}{c_1} \\ y &= \frac {2 c_1 x +\sqrt {3 x^{2} c_1^{2}+1}}{c_1} \\ \end{align*}
Mathematica. Time used: 0.252 (sec). Leaf size: 94
ode=D[y[x],x]==(x-2*y[x])/(2*x-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 x-\sqrt {3 x^2+e^{2 c_1}}\\ y(x)&\to 2 x+\sqrt {3 x^2+e^{2 c_1}}\\ y(x)&\to 2 x-\sqrt {3} \sqrt {x^2}\\ y(x)&\to \sqrt {3} \sqrt {x^2}+2 x \end{align*}
Sympy. Time used: 0.695 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x + 2*y(x))/(2*x - y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 2 x - \sqrt {C_{1} + 3 x^{2}}, \ y{\left (x \right )} = 2 x + \sqrt {C_{1} + 3 x^{2}}\right ] \]