60.3.60 problem 1065

Internal problem ID [11056]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 2, linear second order
Problem number : 1065
Date solved : Sunday, March 30, 2025 at 07:41:10 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.085 (sec). Leaf size: 60
ode:=diff(diff(y(x),x),x)+2*n*diff(y(x),x)*cot(x)+(-a^2+n^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right )^{-n +\frac {1}{2}} \left (c_1 \operatorname {LegendreP}\left (-\frac {1}{2}+\sqrt {-a^{2}+2 n^{2}}, n -\frac {1}{2}, \cos \left (x \right )\right )+c_2 \operatorname {LegendreQ}\left (-\frac {1}{2}+\sqrt {-a^{2}+2 n^{2}}, n -\frac {1}{2}, \cos \left (x \right )\right )\right ) \]
Mathematica. Time used: 0.188 (sec). Leaf size: 83
ode=(-a^2 + n^2)*y[x] + 2*n*Cot[x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (-\sin ^2(x)\right )^{\frac {1}{4}-\frac {n}{2}} \left (c_1 P_{\sqrt {2 n^2-a^2}-\frac {1}{2}}^{n-\frac {1}{2}}(\cos (x))+c_2 Q_{\sqrt {2 n^2-a^2}-\frac {1}{2}}^{n-\frac {1}{2}}(\cos (x))\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
n = symbols("n") 
y = Function("y") 
ode = Eq(2*n*Derivative(y(x), x)/tan(x) + (-a**2 + n**2)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a**2*y(x) - n**2*y(x) - Derivative(y(x), (x, 2)))*tan(x)/(2*n) cannot be solved by the factorable group method