82.6.3 problem Ex. 3

Internal problem ID [18665]
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 22
Problem number : Ex. 3
Date solved : Thursday, March 13, 2025 at 12:31:42 PM
CAS classification : [_separable]

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

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