23.3.501 problem 507

Internal problem ID [6215]
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 : 507
Date solved : Friday, October 03, 2025 at 01:57:00 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} c x y+\left (a -\left (1+a \right ) x^{2}\right ) y^{\prime }+x \left (-x^{2}+1\right ) y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 73
ode:=c*x*y(x)+(a-(a+1)*x^2)*diff(y(x),x)+x*(-x^2+1)*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{\frac {1}{2}-\frac {a}{2}} \left (\operatorname {LegendreQ}\left (-\frac {1}{2}+\frac {\sqrt {a^{2}+4 c}}{2}, -\frac {1}{2}+\frac {a}{2}, \sqrt {-x^{2}+1}\right ) c_2 +\operatorname {LegendreP}\left (-\frac {1}{2}+\frac {\sqrt {a^{2}+4 c}}{2}, -\frac {1}{2}+\frac {a}{2}, \sqrt {-x^{2}+1}\right ) c_1 \right ) \]
Mathematica. Time used: 0.147 (sec). Leaf size: 130
ode=c*x*y[x] + (a - (1 + a)*x^2)*D[y[x],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 c_1 \operatorname {Hypergeometric2F1}\left (\frac {1}{4} \left (a-\sqrt {a^2+4 c}\right ),\frac {1}{4} \left (a+\sqrt {a^2+4 c}\right ),\frac {a+1}{2},x^2\right )+i^{1-a} c_2 x^{1-a} \operatorname {Hypergeometric2F1}\left (\frac {1}{4} \left (-a-\sqrt {a^2+4 c}+2\right ),\frac {1}{4} \left (-a+\sqrt {a^2+4 c}+2\right ),\frac {3-a}{2},x^2\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
c = symbols("c") 
y = Function("y") 
ode = Eq(c*x*y(x) + x*(1 - x**2)*Derivative(y(x), (x, 2)) + (a - x**2*(a + 1))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None