80.3.1 problem 1

Internal problem ID [18466]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 29. Problems at page 81
Problem number : 1
Date solved : Thursday, March 13, 2025 at 12:01:07 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.016 (sec). Leaf size: 17
ode:=y(x)^2 = x*(y(x)-x)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -x \operatorname {LambertW}\left (-\frac {{\mathrm e}^{-c_{1}}}{x}\right ) \]
Mathematica. Time used: 2.01 (sec). Leaf size: 25
ode=y[x]^2==x*(y[x]-x)*D[y[x],x]; 
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.464 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(-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 ) \]