77.1.31 problem 48 (page 56)

Internal problem ID [17842]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 48 (page 56)
Date solved : Thursday, March 13, 2025 at 10:59:20 AM
CAS classification : [[_homogeneous, `class G`], _rational]

\begin{align*} y^{\prime }&=\frac {x -y^{2}}{2 y \left (x +y^{2}\right )} \end{align*}

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