77.1.136 problem 163 (page 240)

Internal problem ID [17955]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 163 (page 240)
Date solved : Monday, March 31, 2025 at 04:52:23 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+\frac {2 y^{\prime }}{x}-\frac {n \left (n +1\right ) y}{x^{2}}&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)/x-n*(n+1)/x^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{-n -1}+c_2 \,x^{n} \]
Mathematica. Time used: 0.056 (sec). Leaf size: 84
ode=D[y[x],{x,2}]+2/x*D[y[x],x]-n*(n+1)/x^2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^{-\frac {1}{2}-\frac {1}{2} i \sqrt {n} \sqrt {n+1} \sqrt {-\frac {1}{n^2+n}-4}} \left (c_2 x^{i \sqrt {n} \sqrt {n+1} \sqrt {-\frac {1}{n^2+n}-4}}+c_1\right ) \]
Sympy. Time used: 0.252 (sec). Leaf size: 60
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-n*(n + 1)*y(x)/x**2 + 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^{- \operatorname {re}{\left (n\right )} - 1} \left (C_{1} \sin {\left (\log {\left (x \right )} \left |{\operatorname {im}{\left (n\right )}}\right | \right )} + C_{2} \cos {\left (\log {\left (x \right )} \operatorname {im}{\left (n\right )} \right )}\right ) + x^{\operatorname {re}{\left (n\right )}} \left (C_{3} \sin {\left (\log {\left (x \right )} \left |{\operatorname {im}{\left (n\right )}}\right | \right )} + C_{4} \cos {\left (\log {\left (x \right )} \operatorname {im}{\left (n\right )} \right )}\right ) \]