4.27.22 \(\left (b^2-a^2\right ) y(x)+2 a \cot (a x) y'(x)+y''(x)=0\)

ODE
\[ \left (b^2-a^2\right ) y(x)+2 a \cot (a x) y'(x)+y''(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.212673 (sec), leaf count = 43

\[\left \{\left \{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 )\right \}\right \}\]

Maple
cpu = 0.378 (sec), leaf count = 29

\[\left [y \left (x \right ) = \frac {\textit {\_C1} \sin \left (b x \right )}{\sin \left (a x \right )}+\frac {\textit {\_C2} \cos \left (b x \right )}{\sin \left (a x \right )}\right ]\] Mathematica raw input

DSolve[(-a^2 + b^2)*y[x] + 2*a*Cot[a*x]*y'[x] + y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> ((2*C[1] - (I*E^((2*I)*b*x)*C[2])/b)*Csc[a*x])/(2*E^(I*b*x))}}

Maple raw input

dsolve(diff(diff(y(x),x),x)+2*a*cot(a*x)*diff(y(x),x)+(-a^2+b^2)*y(x) = 0, y(x))

Maple raw output

[y(x) = _C1/sin(a*x)*sin(b*x)+_C2/sin(a*x)*cos(b*x)]