23.1.469 problem 459

Internal problem ID [5076]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 459
Date solved : Tuesday, September 30, 2025 at 11:33:14 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (a +b x +y\right ) y^{\prime }+a -b x -y&=0 \end{align*}
Maple. Time used: 0.068 (sec). Leaf size: 63
ode:=(a+b*x+y(x))*diff(y(x),x)+a-b*x-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \operatorname {LambertW}\left (\frac {{\mathrm e}^{\frac {-\left (b +1\right )^{2} c_1 +\left (b -1\right ) a +x \left (b +1\right )^{2}}{2 a}}}{2 a}\right ) a -b^{2} x +\left (-a -x \right ) b +a}{b +1} \]
Mathematica. Time used: 2.93 (sec). Leaf size: 118
ode=(a+b*x+y[x])*D[y[x],x]+a-b*x-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {2 a W\left (-e^{\frac {(b+1)^2 x}{2 a}-1+c_1}\right )+a (-b)+a-b (b+1) x}{b+1}\\ y(x)&\to \frac {a (-b)+a-b (b+1) x}{b+1}\\ y(x)&\to \frac {2 a W\left (-e^{\frac {(b+1)^2 x}{2 a}-1}\right )+a (-b)+a-b (b+1) x}{b+1} \end{align*}
Sympy. Time used: 156.101 (sec). Leaf size: 165
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a - b*x + (a + b*x + y(x))*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {- a b + 2 a W\left (- \frac {\sqrt {e^{\frac {C_{1} b^{3} + 3 C_{1} b^{2} + 3 C_{1} b + C_{1} + a b^{2} - a + b^{3} x + 3 b^{2} x + 3 b x + x}{a \left (b + 1\right )}}}}{2 a}\right ) + a - b^{2} x - b x}{b + 1}, \ y{\left (x \right )} = \frac {- a b + 2 a W\left (\frac {\sqrt {e^{\frac {C_{1} b^{3} + 3 C_{1} b^{2} + 3 C_{1} b + C_{1} + a b^{2} - a + b^{3} x + 3 b^{2} x + 3 b x + x}{a \left (b + 1\right )}}}}{2 a}\right ) + a - b^{2} x - b x}{b + 1}\right ] \]