50.5.18 problem 5(c)

Internal problem ID [7888]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.7. Homogeneous Equations. Page 28
Problem number : 5(c)
Date solved : Sunday, March 30, 2025 at 12:35:55 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{\prime }&=\frac {y-x y^{2}}{x +x^{2} y} \end{align*}

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