29.20.15 problem 560

Internal problem ID [5156]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 560
Date solved : Sunday, March 30, 2025 at 06:45:53 AM
CAS classification : [_separable]

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

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