23.3.146 problem 148

Internal problem ID [5860]
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 : 148
Date solved : Tuesday, September 30, 2025 at 02:04:42 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (-a^{2}+b^{2}\right ) y+2 a \cot \left (a x \right ) y^{\prime }+y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 22
ode:=(-a^2+b^2)*y(x)+2*a*cot(a*x)*diff(y(x),x)+diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \csc \left (a x \right ) \left (c_1 \sin \left (b x \right )+c_2 \cos \left (b x \right )\right ) \]
Mathematica. Time used: 0.054 (sec). Leaf size: 43
ode=(-a^2 + b^2)*y[x] + 2*a*Cot[a*x]*D[y[x],x] + D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{-i b x} \csc (a x) \left (2 c_1-\frac {i c_2 e^{2 i b x}}{b}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(2*a*Derivative(y(x), x)/tan(a*x) + (-a**2 + b**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) - b**2*y(x) - Derivative(y(x),