60.1.385 problem 396

Internal problem ID [10399]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 396
Date solved : Sunday, March 30, 2025 at 04:36:52 PM
CAS classification : [_separable]

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

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