76.12.7 problem 7

Internal problem ID [17492]
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.2 (Theory of second order linear homogeneous equations). Problems at page 226
Problem number : 7
Date solved : Monday, March 31, 2025 at 04:15:42 PM
CAS classification : [[_2nd_order, _with_linear_symmetries], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=y_{0}\\ y^{\prime }\left (0\right )&=y_{1} \end{align*}

Maple. Time used: 0.049 (sec). Leaf size: 56
ode:=(-x^2+1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+alpha*(alpha+1)*mu^2/(-x^2+1)*y(x) = 0; 
ic:=y(0) = y__0, D(y)(0) = y__1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {y_{0} \cos \left (\mu \sqrt {\alpha }\, \sqrt {\alpha +1}\, \operatorname {arctanh}\left (x \right )\right ) \sqrt {\alpha }\, \sqrt {\alpha +1}\, \mu +y_{1} \sin \left (\mu \sqrt {\alpha }\, \sqrt {\alpha +1}\, \operatorname {arctanh}\left (x \right )\right )}{\sqrt {\alpha }\, \sqrt {\alpha +1}\, \mu } \]
Mathematica. Time used: 2.13 (sec). Leaf size: 88
ode=(1-x^2)*D[y[x],{x,2}]-2*x*D[y[x],x]+(a*(a+1)*u^2/(1-x^2))*y[x]==0; 
ic={y[0]==y0,Derivative[1][y][0]==y1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {y0} \cos \left (\frac {1}{2} \sqrt {a} \sqrt {a+1} u (\log (1-x)-\log (x+1))\right )-\frac {\text {y1} \sin \left (\frac {1}{2} \sqrt {a} \sqrt {a+1} u (\log (1-x)-\log (x+1))\right )}{\sqrt {a} \sqrt {a+1} u} \]
Sympy
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
mu = symbols("mu") 
y = Function("y") 
ode = Eq(Alpha*mu**2*(Alpha + 1)*y(x)/(1 - x**2) - 2*x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {y(0): y__0, Subs(Derivative(y(x), x), x, 0): y__1} 
dsolve(ode,func=y(x),ics=ics)
 
False