60.1.215 problem 220

Internal problem ID [10229]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 220
Date solved : Sunday, March 30, 2025 at 03:32:56 PM
CAS classification : [_rational, _Bernoulli]

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

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