2.31.13 Problem 161

2.31.13.1 Maple
2.31.13.2 Mathematica
2.31.13.3 Sympy

Internal problem ID [13822]
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 : 161
Date solved : Friday, December 19, 2025 at 01:41:42 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime \prime }+\left (\alpha -\beta +\left (\beta +\alpha -2\right ) x \right ) y^{\prime }+\left (n +1\right ) \left (n +\alpha +\beta \right ) y&=0 \\ \end{align*}
2.31.13.1 Maple. Time used: 0.013 (sec). Leaf size: 64
ode:=(-x^2+1)*diff(diff(y(x),x),x)+(alpha-beta+(alpha+beta-2)*x)*diff(y(x),x)+(n+1)*(n+alpha+beta)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {hypergeom}\left (\left [n +1, -n -\alpha -\beta \right ], \left [-\beta +1\right ], \frac {x}{2}+\frac {1}{2}\right )+c_2 \left (\frac {x}{2}+\frac {1}{2}\right )^{\beta } \operatorname {hypergeom}\left (\left [-n -\alpha , n +1+\beta \right ], \left [1+\beta \right ], \frac {x}{2}+\frac {1}{2}\right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
checking if the LODE is of Euler type 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying a Liouvillian solution using Kovacics algorithm 
<- No Liouvillian solutions exists 
-> Trying a solution in terms of special functions: 
   -> Bessel 
   -> elliptic 
   -> Legendre 
   -> Kummer 
      -> hyper3: Equivalence to 1F1 under a power @ Moebius 
   -> hypergeometric 
      -> heuristic approach 
      <- heuristic approach successful 
   <- hypergeometric successful 
<- special function solution successful
 
2.31.13.2 Mathematica. Time used: 0.09 (sec). Leaf size: 74
ode=(1-x^2)*D[y[x],{x,2}]+(\[Alpha]-\[Beta]+(\[Alpha]+\[Beta]-2)*x)*D[y[x],x]+(n+1)*(n+\[Alpha]+\[Beta])*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2^{-\alpha } c_2 (x-1)^{\alpha } \operatorname {Hypergeometric2F1}\left (n+\alpha +1,-n-\beta ,\alpha +1,\frac {1-x}{2}\right )+c_1 \operatorname {Hypergeometric2F1}\left (n+1,-n-\alpha -\beta ,1-\alpha ,\frac {1-x}{2}\right ) \end{align*}
2.31.13.3 Sympy
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
BETA = symbols("BETA") 
n = symbols("n") 
y = Function("y") 
ode = Eq((1 - x**2)*Derivative(y(x), (x, 2)) + (n + 1)*(Alpha + BETA + n)*y(x) + (Alpha - BETA + x*(Alpha + BETA - 2))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False