76.54.3 problem Ex. 3

Internal problem ID [20304]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter IX. Equations of the second order. problems at end of chapter at page 120
Problem number : Ex. 3
Date solved : Thursday, October 02, 2025 at 05:41:22 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-\frac {2 y^{\prime }}{x}+\left (n^{2}+\frac {2}{x^{2}}\right ) y&=0 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=diff(diff(y(x),x),x)-2/x*diff(y(x),x)+(n^2+2/x^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (c_1 \sin \left (n x \right )+c_2 \cos \left (n x \right )\right ) \]
Mathematica. Time used: 0.044 (sec). Leaf size: 38
ode=D[y[x],{x,2}]-2/x*D[y[x],x]+(n^2+2/x^2)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 x e^{-i n x}-\frac {i c_2 x e^{i n x}}{2 n} \end{align*}
Sympy. Time used: 0.144 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq((n**2 + 2/x**2)*y(x) + Derivative(y(x), (x, 2)) - 2*Derivative(y(x), x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{\frac {3}{2}} \left (C_{1} J_{\frac {1}{2}}\left (n x\right ) + C_{2} Y_{\frac {1}{2}}\left (n x\right )\right ) \]