53.1.703 problem 720

Internal problem ID [11175]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 720
Date solved : Tuesday, September 30, 2025 at 07:36:38 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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