72.8.30 problem 30

Internal problem ID [19514]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 30
Date solved : Thursday, October 02, 2025 at 04:35:49 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +2 y+2}{y-2 x} \end{align*}
Maple. Time used: 0.130 (sec). Leaf size: 30
ode:=diff(y(x),x) = (x+2*y(x)+2)/(y(x)-2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {10 c_1 x -\sqrt {1+125 \left (x +\frac {2}{5}\right )^{2} c_1^{2}}}{5 c_1} \]
Mathematica. Time used: 0.126 (sec). Leaf size: 59
ode=D[y[x],x]==(x+2*y[x]+2)/(-2*x+y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 x-i \sqrt {-5 x^2-4 x-c_1}\\ y(x)&\to 2 x+i \sqrt {-5 x^2-4 x-c_1} \end{align*}
Sympy. Time used: 1.505 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x + 2*y(x) + 2)/(-2*x + y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 2 x - \frac {\sqrt {C_{1} + 125 x^{2} + 100 x}}{5}, \ y{\left (x \right )} = 2 x + \frac {\sqrt {C_{1} + 125 x^{2} + 100 x}}{5}\right ] \]