87.5.19 problem 26

Internal problem ID [23312]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 47
Problem number : 26
Date solved : Thursday, October 02, 2025 at 09:31:33 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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