82.7.2 problem Ex. 3

Internal problem ID [18677]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Exercises at page 24
Problem number : Ex. 3
Date solved : Monday, March 31, 2025 at 05:56:15 PM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.013 (sec). Leaf size: 22
ode:=y(x)*(x*y(x)+2*x^2*y(x)^2)+x*(x*y(x)-x^2*y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= 0 \\ y &= -\frac {1}{\operatorname {LambertW}\left (-\frac {c_1}{x^{3}}\right ) x} \\ \end{align*}
Mathematica. Time used: 6.037 (sec). Leaf size: 40
ode=y[x]*(x*y[x]+2*x^2*y[x]^2)+x*(x*y[x]-x^2*y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 0 \\ y(x)\to -\frac {1}{x W\left (\frac {e^{-1+\frac {9 c_1}{2^{2/3}}}}{x^3}\right )} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.963 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-x**2*y(x)**2 + x*y(x))*Derivative(y(x), x) + (2*x**2*y(x)**2 + x*y(x))*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x^{2} e^{C_{1} + W\left (- \frac {e^{- C_{1}}}{x^{3}}\right )}, \ y{\left (x \right )} = 0\right ] \]