85.33.44 problem 44

Internal problem ID [22667]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 44
Date solved : Thursday, October 02, 2025 at 09:03:25 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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