ODE No. 1438

\[ y''(x)=y(x) \left (-\csc ^2(x)\right ) \sec ^2(x) \left (-a \sin ^2(x) \cos ^2(x)-(m-1) m \sin ^2(x)+(1-n) n \cos ^2(x)\right ) \] Mathematica : cpu = 0.850535 (sec), leaf count = 615

DSolve[Derivative[2][y][x] == -(Csc[x]^2*Sec[x]^2*((1 - n)*n*Cos[x]^2 - (-1 + m)*m*Sin[x]^2 - a*Cos[x]^2*Sin[x]^2)*y[x]),y[x],x]
 

\[\left \{\left \{y(x)\to \frac {c_2 (-1)^{\frac {1}{2} (-2 m-1)+1} \cos ^2(x)^{\frac {1}{4} (-2 m-1)+1} \left (\cos ^2(x)-1\right )^{\frac {1}{2} \left (\frac {4 a m+4 \sqrt {-a} n^2+4 a n-4 \sqrt {-a} n+4 (-a)^{3/2}+8 \sqrt {-a} a+\sqrt {-a}+4 m n^2-4 m n+m+4 n^3-4 n^2+n}{8 a+8 n^2-8 n+2}+\frac {1}{2} \left (-\sqrt {-a}+m+n\right )+\frac {1}{2} (-2 m-1)+1\right )-\frac {1}{4}} \, _2F_1\left (\frac {1}{2} (-2 m-1)+\frac {1}{2} \left (m+n-\sqrt {-a}\right )+1,\frac {1}{2} (-2 m-1)+\frac {4 n^3+4 m n^2+4 \sqrt {-a} n^2-4 n^2+4 a n-4 m n-4 \sqrt {-a} n+n+4 (-a)^{3/2}+8 \sqrt {-a} a+4 a m+m+\sqrt {-a}}{8 n^2-8 n+8 a+2}+1;\frac {1}{2} (-2 m-1)+2;\cos ^2(x)\right )}{\sqrt {\cos (x)}}+\frac {c_1 \cos ^2(x)^{\frac {1}{4} (2 m+1)} \left (\cos ^2(x)-1\right )^{\frac {1}{2} \left (\frac {4 a m+4 \sqrt {-a} n^2+4 a n-4 \sqrt {-a} n+4 (-a)^{3/2}+8 \sqrt {-a} a+\sqrt {-a}+4 m n^2-4 m n+m+4 n^3-4 n^2+n}{8 a+8 n^2-8 n+2}+\frac {1}{2} \left (-\sqrt {-a}+m+n\right )+\frac {1}{2} (-2 m-1)+1\right )-\frac {1}{4}} \, _2F_1\left (\frac {1}{2} \left (m+n-\sqrt {-a}\right ),\frac {4 n^3+4 m n^2+4 \sqrt {-a} n^2-4 n^2+4 a n-4 m n-4 \sqrt {-a} n+n+4 (-a)^{3/2}+8 \sqrt {-a} a+4 a m+m+\sqrt {-a}}{8 n^2-8 n+8 a+2};\frac {1}{2} (2 m+1);\cos ^2(x)\right )}{\sqrt {\cos (x)}}\right \}\right \}\] Maple : cpu = 0.171 (sec), leaf count = 102

dsolve(diff(diff(y(x),x),x) = -(-a*cos(x)^2*sin(x)^2-m*(m-1)*sin(x)^2-n*(n-1)*cos(x)^2)/cos(x)^2/sin(x)^2*y(x),y(x))
 

\[y \left (x \right ) = \left (\sin ^{n}\left (x \right )\right ) \left (\left (\cos ^{m}\left (x \right )\right ) \hypergeom \left (\left [\frac {n}{2}+\frac {m}{2}+\frac {i \sqrt {a}}{2}, \frac {n}{2}+\frac {m}{2}-\frac {i \sqrt {a}}{2}\right ], \left [\frac {1}{2}+m \right ], \cos ^{2}\left (x \right )\right ) c_{1}+\left (\cos ^{-m +1}\left (x \right )\right ) \hypergeom \left (\left [\frac {n}{2}-\frac {m}{2}+\frac {i \sqrt {a}}{2}+\frac {1}{2}, \frac {n}{2}-\frac {m}{2}-\frac {i \sqrt {a}}{2}+\frac {1}{2}\right ], \left [\frac {3}{2}-m \right ], \cos ^{2}\left (x \right )\right ) c_{2}\right )\]