34.4.6 problem 19 (g)

Internal problem ID [7933]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (g)
Date solved : Tuesday, September 30, 2025 at 05:10:18 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`], [_Abel, `2nd type`, `class B`]]

\begin{align*} y+\left (x y+x -3 y\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.011 (sec). Leaf size: 30
ode:=y(x)+(x*y(x)+x-3*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {LambertW}\left (\frac {{\mathrm e}^{\frac {3}{x -3}}}{c_1 \left (x -3\right )}\right )-\frac {3}{x -3} \]
Mathematica. Time used: 0.066 (sec). Leaf size: 52
ode=y[x]+(x*y[x]+x-3*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\frac {e^{-y(x)-1} \int _1^{y(x)}3 e^{K[1]+1} K[1]dK[1]}{y(x)}+\frac {c_1 e^{-y(x)-1}}{y(x)},y(x)\right ] \]
Sympy. Time used: 1.009 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x) + x - 3*y(x))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\left (x - 3\right ) W\left (\frac {e^{\frac {C_{1} \left (x - 3\right ) + 3}{x - 3}}}{x - 3}\right ) - 3}{x - 3} \]