61.30.11 problem 159

Internal problem ID [12580]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.2-5
Problem number : 159
Date solved : Monday, March 31, 2025 at 05:39:57 AM
CAS classification : [_Gegenbauer]

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

Maple. Time used: 0.027 (sec). Leaf size: 39
ode:=(-x^2+1)*diff(diff(y(x),x),x)+(2*a-3)*x*diff(y(x),x)+(n+1)*(n+2*a-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\operatorname {LegendreQ}\left (a +n -\frac {1}{2}, -\frac {1}{2}+a , x\right ) c_2 +\operatorname {LegendreP}\left (a +n -\frac {1}{2}, -\frac {1}{2}+a , x\right ) c_1 \right ) \left (x^{2}-1\right )^{-\frac {1}{4}+\frac {a}{2}} \]
Mathematica. Time used: 0.196 (sec). Leaf size: 158
ode=(1-x^2)*D[y[x],{x,2}]+(2*a-3)*D[y[x],x]+(n+1)*(n+2*a-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 2^{\frac {1}{2}-a} c_2 (x-1)^{a-\frac {1}{2}} \operatorname {Hypergeometric2F1}\left (a-\frac {1}{2} \sqrt {4 n^2+8 a (n+1)-3}-1,a+\frac {1}{2} \sqrt {4 n^2+8 a (n+1)-3}-1,a+\frac {1}{2},\frac {1-x}{2}\right )+c_1 \operatorname {Hypergeometric2F1}\left (\frac {1}{2} \left (-\sqrt {4 n^2+8 a (n+1)-3}-1\right ),\frac {1}{2} \left (\sqrt {4 n^2+8 a (n+1)-3}-1\right ),\frac {3}{2}-a,\frac {1-x}{2}\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x*(2*a - 3)*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)) + (n + 1)*(2*a + n - 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False