12.7.17 problem 18

Internal problem ID [1727]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 18
Date solved : Saturday, March 29, 2025 at 11:37:35 PM
CAS classification : [_separable]

\begin{align*} a y+b x y+\left (c x +d x y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.011 (sec). Leaf size: 56
ode:=a*y(x)+b*x*y(x)+(c*x+d*x*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{-\frac {a}{c}} {\mathrm e}^{\frac {-b x -c \operatorname {LambertW}\left (\frac {d \,x^{-\frac {a}{c}} {\mathrm e}^{\frac {-b x -c_1}{c}}}{c}\right )-c_1}{c}} \]
Mathematica. Time used: 0.955 (sec). Leaf size: 42
ode=(a*y[x]+b*x*y[x])+(c*x+d*x*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {c W\left (\frac {d x^{-\frac {a}{c}} e^{\frac {-b x+c_1}{c}}}{c}\right )}{d} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.530 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
y = Function("y") 
ode = Eq(a*y(x) + b*x*y(x) + (c*x + d*x*y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {c W\left (\frac {d e^{\frac {C_{1} - a \log {\left (x \right )} - b x}{c}}}{c}\right )}{d} \]