4.29.19 \((1-x \cot (x)) y''(x)-x y'(x)+y(x)=0\)

ODE
\[ (1-x \cot (x)) y''(x)-x y'(x)+y(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 1.06986 (sec), leaf count = 0 , could not solve

DSolve[y[x] - x*Derivative[1][y][x] + (1 - x*Cot[x])*Derivative[2][y][x] == 0, y[x], x]

Maple
cpu = 2.069 (sec), leaf count = 92

\[ \left \{ y \left ( x \right ) =-{\frac {1}{2\,{{\rm e}^{2\,ix}}+2} \left ( \left ( -2\,{\it \_C2}\,x\sqrt {{\frac {{{\rm e}^{2\,ix}}}{ \left ( {{\rm e}^{2\,ix}}+1 \right ) ^{2}}}}+i{\it \_C1} \right ) {{\rm e}^{2\,ix}}-2\,{\it \_C2}\,x\sqrt {{\frac {{{\rm e}^{2\,ix}}}{ \left ( {{\rm e}^{2\,ix}}+1 \right ) ^{2}}}}-i{\it \_C1} \right ) {\frac {1}{\sqrt {{\frac {{{\rm e}^{2\,ix}}}{ \left ( {{\rm e}^{2\,ix}}+1 \right ) ^{2}}}}}}} \right \} \] Mathematica raw input

DSolve[y[x] - x*y'[x] + (1 - x*Cot[x])*y''[x] == 0,y[x],x]

Mathematica raw output

DSolve[y[x] - x*Derivative[1][y][x] + (1 - x*Cot[x])*Derivative[2][y][x] == 0, y
[x], x]

Maple raw input

dsolve((1-x*cot(x))*diff(diff(y(x),x),x)-x*diff(y(x),x)+y(x) = 0, y(x),'implicit')

Maple raw output

y(x) = -((-2*_C2*x*(exp(2*I*x)/(exp(2*I*x)+1)^2)^(1/2)+I*_C1)*exp(2*I*x)-2*_C2*x
*(exp(2*I*x)/(exp(2*I*x)+1)^2)^(1/2)-I*_C1)/(exp(2*I*x)/(exp(2*I*x)+1)^2)^(1/2)/
(2*exp(2*I*x)+2)