23.3.375 problem 379

Internal problem ID [6089]
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 : 379
Date solved : Friday, October 03, 2025 at 01:46:17 AM
CAS classification : [_Gegenbauer]

\begin{align*} -\left (k -p \right ) \left (1+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.020 (sec). Leaf size: 27
ode:=-(k-p)*(1+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 (p , k , x\right ) c_1 +\operatorname {LegendreQ}\left (p , k , x\right ) c_2 \right ) \left (x^{2}-1\right )^{-\frac {k}{2}} \]
Mathematica. Time used: 0.026 (sec). Leaf size: 32
ode=-((k - p)*(1 + 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_p^k(x)+c_2 Q_p^k(x)) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
k = symbols("k") 
p = symbols("p") 
y = Function("y") 
ode = Eq(-x*(2*k + 2)*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)) + (-k + p)*(k + p + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False