15.5.10 problem 10

Internal problem ID [2946]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 9, page 38
Problem number : 10
Date solved : Sunday, March 30, 2025 at 01:00:40 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.010 (sec). Leaf size: 18
ode:=2*x*y(x)+(y(x)-x^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{2}}{\operatorname {LambertW}\left (-c_1 \,x^{2}\right )} \]
Mathematica. Time used: 3.146 (sec). Leaf size: 285
ode=2*x*y[x]+(y[x]-x^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {\left (2-\frac {2 \left (x^3+2 x y(x)\right )}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}\right ) \left (\frac {x^3+2 x y(x)}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}+2\right ) \left (\left (1-\frac {x \left (x^2+2 y(x)\right )}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}\right ) \log \left (\frac {2-\frac {2 \left (x^3+2 x y(x)\right )}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}}{\sqrt [3]{2}}\right )+\left (\frac {x^3+2 x y(x)}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}-1\right ) \log \left (\frac {\frac {2 \left (x^3+2 x y(x)\right )}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}+4}{\sqrt [3]{2}}\right )-3\right )}{9 \sqrt [3]{2} \left (-\frac {\left (x^2+2 y(x)\right )^3}{\left (x^2-y(x)\right )^3}+\frac {3 \left (x^3+2 x y(x)\right )}{\sqrt [3]{x^3} \left (x^2-y(x)\right )}-2\right )}=\frac {2\ 2^{2/3} x \log (x)}{9 \sqrt [3]{x^3}}+c_1,y(x)\right ] \]
Sympy. Time used: 0.763 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x) + (-x**2 + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{- C_{1} + W\left (- x^{2} e^{C_{1}}\right )} \]