ODE No. 1711

\[ y(x)^2 \log (y(x)) \left (\cos ^2(x)-n^2 \cot ^2(x)\right )+y(x) y''(x)-y'(x)^2+y(x) y'(x) (\tan (x)+\cot (x))=0 \] Mathematica : cpu = 21.0527 (sec), leaf count = 9987

DSolve[(Cos[x]^2 - n^2*Cot[x]^2)*Log[y[x]]*y[x]^2 + (Cot[x] + Tan[x])*y[x]*Derivative[1][y][x] - Derivative[1][y][x]^2 + y[x]*Derivative[2][y][x] == 0,y[x],x]
 

\[\left \{\left \{y(x)\to \frac {(-1)^{1-n} 2^{n+\frac {1}{2}} e^{(-1)^{1-n} 2^{-\frac {3 n}{2}-4} \left (c_2-\int _1^x\frac {\csc ^2(K[3]) \sec (K[3]) \left (-2^{3 n+3} n^2 \sqrt {\cos (2 K[3])-1} \cos (2 K[3]) \log (y(K[3])) y(K[3]) K_n(i \sin (K[3])){}^2-2^{3 n+1} \sqrt {\cos (2 K[3])-1} \cos (4 K[3]) \log (y(K[3])) y(K[3]) K_n(i \sin (K[3])){}^2+2^{3 n+1} \sqrt {\cos (2 K[3])-1} \log (y(K[3])) y(K[3]) K_n(i \sin (K[3])){}^2-2^{3 n+3} n^2 \sqrt {\cos (2 K[3])-1} \log (y(K[3])) y(K[3]) K_n(i \sin (K[3])){}^2+(-1)^{n+1} 2^{\frac {3 n}{2}+4} c_1 \sin (K[3]) y(K[3]) K_n(i \sin (K[3]))+(-1)^{n+1} 2^{\frac {3 n}{2}+4} \sin (K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1] K_n(i \sin (K[3]))-2^{3 n+\frac {3}{2}} K_{n-1}(i \sin (K[3])) \sin (2 K[3]) y'(K[3]) K_n(i \sin (K[3]))-2^{3 n+\frac {3}{2}} K_{n+1}(i \sin (K[3])) \sin (2 K[3]) y'(K[3]) K_n(i \sin (K[3]))+2^{3 n+\frac {1}{2}} K_{n-1}(i \sin (K[3])) \sin (4 K[3]) y'(K[3]) K_n(i \sin (K[3]))+2^{3 n+\frac {1}{2}} K_{n+1}(i \sin (K[3])) \sin (4 K[3]) y'(K[3]) K_n(i \sin (K[3]))+4 (-1)^{2 n} \sqrt {\cos (2 K[3])-1} \cos (2 K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]{}^2+4 (-1)^{2 n} \sqrt {\cos (2 K[3])-1} y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]{}^2+4 (-1)^{2 n} c_1{}^2 \sqrt {\cos (2 K[3])-1} \cos (2 K[3]) y(K[3])+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n-1}(i \sin (K[3])) c_1 \sqrt {\cos (2 K[3])-1} \sin (K[3]) y(K[3])+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n+1}(i \sin (K[3])) c_1 \sqrt {\cos (2 K[3])-1} \sin (K[3]) y(K[3])+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n-1}(i \sin (K[3])) c_1 \sqrt {\cos (2 K[3])-1} \sin (3 K[3]) y(K[3])+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n+1}(i \sin (K[3])) c_1 \sqrt {\cos (2 K[3])-1} \sin (3 K[3]) y(K[3])+4 (-1)^{2 n} c_1{}^2 \sqrt {\cos (2 K[3])-1} y(K[3])+8 (-1)^{2 n} c_1 \sqrt {\cos (2 K[3])-1} \cos (2 K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n-1}(i \sin (K[3])) \sqrt {\cos (2 K[3])-1} \sin (K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n+1}(i \sin (K[3])) \sqrt {\cos (2 K[3])-1} \sin (K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n-1}(i \sin (K[3])) \sqrt {\cos (2 K[3])-1} \sin (3 K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]+(-1)^n 2^{\frac {3 n}{2}+\frac {1}{2}} K_{n+1}(i \sin (K[3])) \sqrt {\cos (2 K[3])-1} \sin (3 K[3]) y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]+8 (-1)^{2 n} c_1 \sqrt {\cos (2 K[3])-1} y(K[3]) \int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]\right )}{K_n(i \sin (K[3])) y(K[3]) \left (c_1+\int _1^{K[3]}\frac {(-1)^{1-n} i^{-n-1} 2^{n-4} \sec ^2(K[1]) \sin ^{-n-3}(K[1]) \left (-i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+3}{2}} K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-3 i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+5}{2}} n^2 K_n(i \sin (K[1])) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])+i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+1}{2}} K_n(i \sin (K[1])) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \sin ^n(K[1])-i^n 2^{\frac {n+9}{2}} K_n(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+1}(K[1])+3 i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) y'(K[1]) \sin ^{n+1}(K[1])+i^n 2^{\frac {n+5}{2}} K_n(i \sin (K[1])) \cos (3 K[1]) \sec (K[1]) y'(K[1]) \sin ^{n+1}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])+i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos ^2(K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n-1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])-i^{n+1} 2^{\frac {n+3}{2}} K_{n+1}(i \sin (K[1])) \cos (K[1]) \cos (3 K[1]) y'(K[1]) \sin ^{n+2}(K[1])\right )}{y(K[1])}dK[1]\right )}dK[3]\right )} K_n\left (\sqrt {\cos ^2(x)-1}\right ) \sqrt {(\cos (x)-1) (\cos (x)+1)} \left (\cos ^2(x)-1\right )^{-n/2} \left (2 \cos ^2(x)-2\right )^{n/2} \sec (x)}{c_1+\int _1^x\frac {(-1)^{1-n} 2^{n-2} \left (\cos ^2(K[1])-1\right )^{-\frac {n}{2}-\frac {1}{2}} \sec (K[1]) \left (12 \sqrt {2} n^2 K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-2 \sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^3(K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-12 \sqrt {2} n^2 K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+2 \sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+4 \sqrt {2} n^2 K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+\sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-4 \sqrt {2} n^2 K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-\sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (3 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+\sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-\sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (5 K[1]) \log (y(K[1])) y(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-16 \sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+12 \sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-2 \sqrt {2} K_{n-1}\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (K[1]) \sqrt {\cos ^2(K[1])-1} \cos (3 K[1]) \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}-2 \sqrt {2} K_{n+1}\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (K[1]) \sqrt {\cos ^2(K[1])-1} \cos (3 K[1]) \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+2 \sqrt {2} K_{n-1}\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \sqrt {\cos ^2(K[1])-1} \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+2 \sqrt {2} K_{n+1}\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos ^2(K[1]) \sqrt {\cos ^2(K[1])-1} \sin (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}+4 \sqrt {2} K_n\left (\sqrt {\cos ^2(K[1])-1}\right ) \cos (3 K[1]) \tan (K[1]) y'(K[1]) \left (2 \cos ^2(K[1])-2\right )^{n/2}\right )}{(\cos (K[1])-\cos (3 K[1])) y(K[1])}dK[1]}\right \}\right \}\] Maple : cpu = 0.611 (sec), leaf count = 81

dsolve(diff(diff(y(x),x),x)*y(x)-diff(y(x),x)^2+(tan(x)+cot(x))*y(x)*diff(y(x),x)+(cos(x)^2-n^2*cot(x)^2)*y(x)^2*ln(y(x))=0,y(x))
 

\[y \left (x \right ) = {\mathrm e}^{-\frac {\BesselY \left (n , \sin \left (x \right )\right ) c_{2}}{\sin \left (x \right ) \left (\BesselJ \left (n +1, \sin \left (x \right )\right ) \BesselY \left (n , \sin \left (x \right )\right )-\BesselY \left (n +1, \sin \left (x \right )\right ) \BesselJ \left (n , \sin \left (x \right )\right )\right )}} {\mathrm e}^{\frac {\BesselJ \left (n , \sin \left (x \right )\right ) c_{1}}{\sin \left (x \right ) \left (\BesselJ \left (n +1, \sin \left (x \right )\right ) \BesselY \left (n , \sin \left (x \right )\right )-\BesselY \left (n +1, \sin \left (x \right )\right ) \BesselJ \left (n , \sin \left (x \right )\right )\right )}}\]