29.9.14 problem 254

Internal problem ID [4854]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 9
Problem number : 254
Date solved : Sunday, March 30, 2025 at 04:04:21 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=x^2*diff(y(x),x) = (b*x+a)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{b} {\mathrm e}^{-\frac {a}{x}} \]
Mathematica. Time used: 0.046 (sec). Leaf size: 28
ode=x^2 D[y[x],x]==(a+b x)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 x^b e^{-\frac {a+b x}{x}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.361 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) - (a + b*x)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \frac {a}{x} + b \log {\left (x \right )}} \]