23.3.374 problem 378

Internal problem ID [6088]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 378
Date solved : Friday, October 03, 2025 at 01:46:16 AM
CAS classification : [_Gegenbauer]

\begin{align*} p \left (1+2 k +p \right ) y-2 \left (1+k \right ) x y^{\prime }+\left (-x^{2}+1\right ) y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.019 (sec). Leaf size: 31
ode:=p*(1+2*k+p)*y(x)-2*(1+k)*x*diff(y(x),x)+(-x^2+1)*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\operatorname {LegendreP}\left (k +p , k , x\right ) c_1 +\operatorname {LegendreQ}\left (k +p , k , x\right ) c_2 \right ) \left (x^{2}-1\right )^{-\frac {k}{2}} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 36
ode=p*(1 + 2*k + p)*y[x] - 2*(1 + k)*x*D[y[x],x] + (1 - x^2)*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (x^2-1\right )^{-k/2} (c_1 P_{k+p}^k(x)+c_2 Q_{k+p}^k(x)) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
k = symbols("k") 
p = symbols("p") 
y = Function("y") 
ode = Eq(p*(2*k + p + 1)*y(x) - x*(2*k + 2)*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False