69.6.9 problem 133

Internal problem ID [18052]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 133
Date solved : Thursday, October 02, 2025 at 02:36:15 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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