79.2.7 problem (h)

Internal problem ID [21089]
Book : Ordinary Differential Equations. By Wolfgang Walter. Graduate texts in Mathematics. Springer. NY. QA372.W224 1998
Section : Chapter 1. First order equations: Some integrable cases. Excercises XIII at page 24
Problem number : (h)
Date solved : Thursday, October 02, 2025 at 07:07:13 PM
CAS classification : [_separable]

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