50.23.3 problem 1(c)

Internal problem ID [8166]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 4. Power Series Solutions and Special Functions. Problems for review and discovert. (B) Challenge Problems . Page 194
Problem number : 1(c)
Date solved : Sunday, March 30, 2025 at 12:47:10 PM
CAS classification : [_Gegenbauer]

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

Using series method with expansion around

\begin{align*} \infty \end{align*}

Maple. Time used: 0.040 (sec). Leaf size: 246
Order:=8; 
ode:=(-x^2+1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+p*(p+1)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=infinity);
 
\[ y = \frac {c_1 \left (\frac {1}{x}\right )^{p} \left (1+\frac {p^{2}+3 p +2}{2 \left (2 p +3\right ) x^{2}}+\frac {p^{4}+10 p^{3}+35 p^{2}+50 p +24}{8 \left (2 p +5\right ) \left (2 p +3\right ) x^{4}}+\frac {p^{6}+21 p^{5}+175 p^{4}+735 p^{3}+1624 p^{2}+1764 p +720}{48 \left (2 p +7\right ) \left (2 p +5\right ) \left (2 p +3\right ) x^{6}}+O\left (\frac {1}{x^{8}}\right )\right )}{x}+c_2 \left (\frac {1}{x}\right )^{-p} \left (1-\frac {p \left (p -1\right )}{2 \left (2 p -1\right ) x^{2}}+\frac {p \left (p^{3}-6 p^{2}+11 p -6\right )}{8 \left (2 p -3\right ) \left (2 p -1\right ) x^{4}}-\frac {p \left (p^{5}-15 p^{4}+85 p^{3}-225 p^{2}+274 p -120\right )}{48 \left (2 p -5\right ) \left (2 p -3\right ) \left (2 p -1\right ) x^{6}}+O\left (\frac {1}{x^{8}}\right )\right ) \]
Mathematica. Time used: 0.018 (sec). Leaf size: 2707
ode=(1-x^2)*D[y[x],{x,2}]-2*x*D[y[x],x]+p*(p+1)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,Infinity,7}]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy. Time used: 22.260 (sec). Leaf size: 1428
from sympy import * 
x = symbols("x") 
p = symbols("p") 
y = Function("y") 
ode = Eq(p*(p + 1)*y(x) - 2*x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=inf,n=8)
 
\[ \text {Solution too large to show} \]