89.9.7 problem 7

Internal problem ID [24487]
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 72
Problem number : 7
Date solved : Thursday, October 02, 2025 at 10:42:23 PM
CAS classification : [[_homogeneous, `class D`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y \left (y+2 x -2\right )-2 \left (x +y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 37
ode:=y(x)*(y(x)+2*x-2)-2*(x+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -x -\sqrt {x^{2}+{\mathrm e}^{x} c_1} \\ y &= -x +\sqrt {x^{2}+{\mathrm e}^{x} c_1} \\ \end{align*}
Mathematica. Time used: 3.848 (sec). Leaf size: 83
ode=y[x]*( y[x]+2*x-2)-2*( x+y[x] )*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x-\sqrt {x^2+e^{x+2 c_1}}\\ y(x)&\to -x+\sqrt {x^2+e^{x+2 c_1}}\\ y(x)&\to -\sqrt {x^2}-x\\ y(x)&\to \sqrt {x^2}-x \end{align*}
Sympy. Time used: 2.943 (sec). Leaf size: 85
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(2*x + 2*y(x))*Derivative(y(x), x) + (2*x + y(x) - 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x - \sqrt {x^{2} - \sqrt {C_{1} e^{2 x}}}, \ y{\left (x \right )} = - x + \sqrt {x^{2} - \sqrt {C_{1} e^{2 x}}}, \ y{\left (x \right )} = - x - \sqrt {x^{2} + \sqrt {C_{1} e^{2 x}}}, \ y{\left (x \right )} = - x + \sqrt {x^{2} + \sqrt {C_{1} e^{2 x}}}\right ] \]