76.11.3 problem 3

Internal problem ID [17476]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.1 (Definitions and examples). Problems at page 214
Problem number : 3
Date solved : Monday, March 31, 2025 at 04:14:40 PM
CAS classification : [_Gegenbauer]

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

Maple. Time used: 0.018 (sec). Leaf size: 15
ode:=(-x^2+1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+alpha*(alpha+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {LegendreP}\left (\alpha , x\right )+c_2 \operatorname {LegendreQ}\left (\alpha , x\right ) \]
Mathematica. Time used: 0.032 (sec). Leaf size: 18
ode=(1-x^2)*D[y[x],{x,2}]-2*x*D[y[x],x]+a*(1+a)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 \operatorname {LegendreP}(a,x)+c_2 \operatorname {LegendreQ}(a,x) \]
Sympy
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
y = Function("y") 
ode = Eq(Alpha*(Alpha + 1)*y(x) - 2*x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False