47.2.45 problem Example 6

Internal problem ID [7461]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : Example 6
Date solved : Wednesday, March 05, 2025 at 04:38:56 AM
CAS classification : [[_homogeneous, `class G`], _rational]

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

Maple. Time used: 0.025 (sec). Leaf size: 28
ode:=2*x*diff(y(x),x)*(x-y(x)^2)+y(x)^3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\frac {c_{1}}{2}}}{\sqrt {-\frac {{\mathrm e}^{c_{1}}}{x \operatorname {LambertW}\left (-\frac {{\mathrm e}^{c_{1}}}{x}\right )}}} \]
Mathematica. Time used: 2.894 (sec). Leaf size: 60
ode=2*x*D[y[x],x]*(x-y[x]^2)+y[x]^3==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -i \sqrt {x} \sqrt {W\left (-\frac {e^{c_1}}{x}\right )} \\ y(x)\to i \sqrt {x} \sqrt {W\left (-\frac {e^{c_1}}{x}\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.218 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*(x - y(x)**2)*Derivative(y(x), x) + y(x)**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{- \frac {C_{1}}{2} - \frac {W\left (- \frac {e^{- C_{1}}}{x}\right )}{2}} \]