85.33.23 problem 23

Internal problem ID [22646]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 23
Date solved : Thursday, October 02, 2025 at 09:02:29 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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