82.47.6 problem Ex. 6

Internal problem ID [18910]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VIII. Exact differential equations, and equations of particular forms. Integration in series. problems at page 102
Problem number : Ex. 6
Date solved : Monday, March 31, 2025 at 06:21:41 PM
CAS classification : [_Gegenbauer]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

Maple. Time used: 0.009 (sec). Leaf size: 81
Order:=6; 
ode:=(-x^2+1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+n*(n+1)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1-\frac {n \left (n +1\right ) x^{2}}{2}+\frac {n \left (n^{3}+2 n^{2}-5 n -6\right ) x^{4}}{24}\right ) y \left (0\right )+\left (x -\frac {\left (n^{2}+n -2\right ) x^{3}}{6}+\frac {\left (n^{4}+2 n^{3}-13 n^{2}-14 n +24\right ) x^{5}}{120}\right ) y^{\prime }\left (0\right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.002 (sec). Leaf size: 120
ode=(1-x^2)*D[y[x],{x,2}]-2*x*D[y[x],x]+n*(n+1)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_2 \left (\frac {1}{120} \left (n^2+n\right )^2 x^5+\frac {7}{60} \left (-n^2-n\right ) x^5+\frac {1}{6} \left (-n^2-n\right ) x^3+\frac {x^5}{5}+\frac {x^3}{3}+x\right )+c_1 \left (\frac {1}{24} \left (n^2+n\right )^2 x^4+\frac {1}{4} \left (-n^2-n\right ) x^4+\frac {1}{2} \left (-n^2-n\right ) x^2+1\right ) \]
Sympy. Time used: 1.076 (sec). Leaf size: 83
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(n*(n + 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,hint="2nd_power_series_ordinary",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {n^{4} x^{4}}{24} + \frac {n^{3} x^{4}}{12} - \frac {5 n^{2} x^{4}}{24} - \frac {n^{2} x^{2}}{2} - \frac {n x^{4}}{4} - \frac {n x^{2}}{2} + 1\right ) + C_{1} x \left (- \frac {n^{2} x^{2}}{6} - \frac {n x^{2}}{6} + \frac {x^{2}}{3} + 1\right ) + O\left (x^{6}\right ) \]