4.25.22 \(y(x) \left (\text {a0}+\text {a1} \cos ^2(x)+\text {a2} \csc ^2(x)\right )+y''(x)=0\)

ODE
\[ y(x) \left (\text {a0}+\text {a1} \cos ^2(x)+\text {a2} \csc ^2(x)\right )+y''(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

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

DSolve[(a0 + a1*Cos[x]^2 + a2*Csc[x]^2)*y[x] + Derivative[2][y][x] == 0, y[x], x]

Maple
cpu = 1.807 (sec), leaf count = 93

\[\left [y \left (x \right ) = \textit {\_C1} \left (\sin ^{\frac {1}{2}+\frac {\sqrt {-4 \mathit {a2} +1}}{2}}\left (x \right )\right ) \HeunC \left (0, -\frac {1}{2}, \frac {\sqrt {-4 \mathit {a2} +1}}{2}, -\frac {\mathit {a1}}{4}, \frac {3}{8}-\frac {\mathit {a0}}{4}-\frac {\mathit {a2}}{4}, \cos ^{2}\left (x \right )\right )+\textit {\_C2} \left (\sin ^{\frac {1}{2}+\frac {\sqrt {-4 \mathit {a2} +1}}{2}}\left (x \right )\right ) \cos \left (x \right ) \HeunC \left (0, \frac {1}{2}, \frac {\sqrt {-4 \mathit {a2} +1}}{2}, -\frac {\mathit {a1}}{4}, \frac {3}{8}-\frac {\mathit {a0}}{4}-\frac {\mathit {a2}}{4}, \cos ^{2}\left (x \right )\right )\right ]\] Mathematica raw input

DSolve[(a0 + a1*Cos[x]^2 + a2*Csc[x]^2)*y[x] + y''[x] == 0,y[x],x]

Mathematica raw output

DSolve[(a0 + a1*Cos[x]^2 + a2*Csc[x]^2)*y[x] + Derivative[2][y][x] == 0, y[x], x
]

Maple raw input

dsolve(diff(diff(y(x),x),x)+(a0+a1*cos(x)^2+a2*csc(x)^2)*y(x) = 0, y(x))

Maple raw output

[y(x) = _C1*sin(x)^(1/2+1/2*(-4*a2+1)^(1/2))*HeunC(0,-1/2,1/2*(-4*a2+1)^(1/2),-1
/4*a1,3/8-1/4*a0-1/4*a2,cos(x)^2)+_C2*sin(x)^(1/2+1/2*(-4*a2+1)^(1/2))*cos(x)*He
unC(0,1/2,1/2*(-4*a2+1)^(1/2),-1/4*a1,3/8-1/4*a0-1/4*a2,cos(x)^2)]