29.19.9 problem 522

Internal problem ID [5118]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 19
Problem number : 522
Date solved : Tuesday, March 04, 2025 at 07:59:17 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`], [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.055 (sec). Leaf size: 50
ode:=(2+3*x-x*y(x))*diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {y \left (x \right )^{3} c_{1} x -2 y \left (x \right )^{2} c_{1} -4 c_{1} y \left (x \right )+{\mathrm e}^{y \left (x \right )}-4 c_{1}}{x y \left (x \right )^{3}-2 y \left (x \right )^{2}-4 y \left (x \right )-4} = 0 \]
Mathematica. Time used: 0.089 (sec). Leaf size: 35
ode=(2+3 x-x y[x])D[y[x],x]+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=-\frac {2 \left (-y(x)^2-2 y(x)-2\right )}{y(x)^3}+\frac {c_1 e^{y(x)}}{y(x)^3},y(x)\right ] \]
Sympy. Time used: 1.173 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*y(x) + 3*x + 2)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x y^{3}{\left (x \right )} e^{- y{\left (x \right )}} - 2 \left (y^{2}{\left (x \right )} + 2 y{\left (x \right )} + 2\right ) e^{- y{\left (x \right )}} = 0 \]