23.1.165 problem 165

Internal problem ID [4772]
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 : 165
Date solved : Tuesday, September 30, 2025 at 08:31:03 AM
CAS classification : [_separable]

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