77.1.40 problem 57 (page 103)

Internal problem ID [17859]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 57 (page 103)
Date solved : Monday, March 31, 2025 at 04:37:17 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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

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