60.1.492 problem 505

Internal problem ID [10506]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 505
Date solved : Sunday, March 30, 2025 at 05:31:01 PM
CAS classification : [_separable]

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

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