47.2.15 problem 15

Internal problem ID [7431]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 15
Date solved : Sunday, March 30, 2025 at 12:03:26 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

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