15.8.27 problem 28

Internal problem ID [3030]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 28
Date solved : Sunday, March 30, 2025 at 01:11:18 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} 2 x y^{\prime }-y+\frac {x^{2}}{y^{2}}&=0 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 70
ode:=2*x*diff(y(x),x)-y(x)+x^2/y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \left (-\left (3 \sqrt {x}-c_1 \right ) x^{{3}/{2}}\right )^{{1}/{3}} \\ y &= -\frac {\left (\left (-3 \sqrt {x}+c_1 \right ) x^{{3}/{2}}\right )^{{1}/{3}} \left (1+i \sqrt {3}\right )}{2} \\ y &= \frac {\left (\left (-3 \sqrt {x}+c_1 \right ) x^{{3}/{2}}\right )^{{1}/{3}} \left (-1+i \sqrt {3}\right )}{2} \\ \end{align*}
Mathematica. Time used: 3.734 (sec). Leaf size: 80
ode=2*x*D[y[x],x]-y[x]+x^2/y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \sqrt [3]{-3 x^2+c_1 x^{3/2}} \\ y(x)\to -\sqrt [3]{-1} \sqrt [3]{-3 x^2+c_1 x^{3/2}} \\ y(x)\to (-1)^{2/3} \sqrt [3]{-3 x^2+c_1 x^{3/2}} \\ \end{align*}
Sympy. Time used: 1.270 (sec). Leaf size: 73
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2/y(x)**2 + 2*x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \sqrt [3]{C_{1} x^{\frac {3}{2}} - 3 x^{2}}, \ y{\left (x \right )} = \frac {\left (-1 - \sqrt {3} i\right ) \sqrt [3]{C_{1} x^{\frac {3}{2}} - 3 x^{2}}}{2}, \ y{\left (x \right )} = \frac {\left (-1 + \sqrt {3} i\right ) \sqrt [3]{C_{1} x^{\frac {3}{2}} - 3 x^{2}}}{2}\right ] \]