ODE No. 1232

\[ \frac {n x P_n(x)-n P_{n-1}(x)}{x^2-1}-n (n+1) y(x)+\left (x^2-1\right ) y''(x)=0 \] Mathematica : cpu = 5.9798 (sec), leaf count = 6628

DSolve[(-(n*LegendreP[-1 + n, x]) + n*x*LegendreP[n, x])/(-1 + x^2) - n*(1 + n)*y[x] + (-1 + x^2)*Derivative[2][y][x] == 0,y[x],x]
 

\[\left \{\left \{y(x)\to c_1 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};x^2\right )+\int _1^x\left (\frac {3 \left (n \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1])-n \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1])\right )}{4 \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right ) (K[1]-1)^2}-\frac {3 \left (n \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1])+n \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1])\right )}{4 \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right ) (K[1]+1)^2}+\frac {3 \left (-2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1]) n^3+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^3-2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1]) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n\right )}{4 \left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right ){}^2 (K[1]-1)}-\frac {3 \left (2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1]) n^3+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^3+2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_{n-1}(K[1]) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n\right )}{4 \left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right ){}^2 (K[1]+1)}+\frac {3 \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ){}^2 \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ){}^2 \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) K[1] P_{n-1}(K[1]) n^5+2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ){}^2 \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ){}^2 \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) K[1] P_{n-1}(K[1]) n^4+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ){}^2 \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^4-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^4+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ){}^2 \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ){}^2 \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) K[1] P_{n-1}(K[1]) n^3+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ){}^2 \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^3-6 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^3-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) P_n(K[1]) n^2\right )}{\left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right ){}^2 \left (n^2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) K[1]^2+n \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[1]^2\right ) K[1]^2+3 n \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )-3 n \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[1]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[1]^2\right )\right )}\right )dK[1] \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};x^2\right )+i x c_2 \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};x^2\right )+i x \, _2F_1\left (\frac {n}{2}+\frac {1}{2},-\frac {n}{2};\frac {3}{2};x^2\right ) \int _1^x\left (\frac {3 i \left (n \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) P_{n-1}(K[2])-n \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) P_n(K[2])\right )}{4 \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right ) (K[2]-1)^2}+\frac {3 i \left (n \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) P_{n-1}(K[2])+n \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) P_n(K[2])\right )}{4 \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n^2+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right ) (K[2]+1)^2}-\frac {3 i \left (-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_{n-1}(K[2]) n^3-2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_n(K[2]) n^3-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2-2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_n(K[2]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n\right )}{4 \left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right ){}^2 (K[2]+1)}+\frac {3 i \left (-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_{n-1}(K[2]) n^3+2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_n(K[2]) n^3-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n^2+2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) P_n(K[2]) n^2+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) P_{n-1}(K[2]) n\right )}{4 \left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right ){}^2 (K[2]-1)}+\frac {3 i \left (\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 P_{n-1}(K[2]) n^5-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 K[2] P_n(K[2]) n^5+2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 P_{n-1}(K[2]) n^4-2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 K[2] P_n(K[2]) n^4+\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 P_{n-1}(K[2]) n^3-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ){}^2 \, _2F_1\left (-\frac {n}{2}-\frac {1}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ){}^2 K[2] P_n(K[2]) n^3\right )}{\left (-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n^2-\, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) n-3 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right ) n+3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right ){}^2 \left (n^2 \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) K[2]^2+n \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (1-\frac {n}{2},\frac {n+3}{2};\frac {5}{2};K[2]^2\right ) K[2]^2+3 n \, _2F_1\left (\frac {1}{2} (-n-1),\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )-3 n \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )-3 \, _2F_1\left (\frac {1-n}{2},\frac {n}{2};\frac {1}{2};K[2]^2\right ) \, _2F_1\left (-\frac {n}{2},\frac {n+1}{2};\frac {3}{2};K[2]^2\right )\right )}\right )dK[2]\right \}\right \}\] Maple : cpu = 0.152 (sec), leaf count = 409

dsolve((x^2-1)*diff(diff(y(x),x),x)-n*(n+1)*y(x)+Diff(LegendreP(n,x),x)=0,y(x))
 

\[y \left (x \right ) = 3 \left (1+x \right ) \left (x -1\right ) \left (-\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right ) \left (n +1\right ) \left (\int \frac {x \hypergeom \left (\left [-\frac {n}{2}+1, \frac {n}{2}+\frac {3}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right ) \left (x \LegendreP \left (n , x\right )-\LegendreP \left (n +1, x\right )\right )}{3 \left (\left (\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right )+\left (n^{2}+n -2\right ) x^{2} \hypergeom \left (\left [\frac {n}{2}+2, \frac {3}{2}-\frac {n}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right )\right ) \hypergeom \left (\left [-\frac {n}{2}+1, \frac {n}{2}+\frac {3}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right )-\frac {\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right ) \hypergeom \left (\left [-\frac {n}{2}+2, \frac {n}{2}+\frac {5}{2}\right ], \left [\frac {5}{2}\right ], x^{2}\right ) x^{2} \left (n +3\right ) \left (n -2\right )}{3}\right ) \left (1+x \right )^{3} \left (x -1\right )^{3}}d x \right )+x \hypergeom \left (\left [-\frac {n}{2}+1, \frac {n}{2}+\frac {3}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right ) \left (n +1\right ) \left (\int \frac {\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right ) \left (x \LegendreP \left (n , x\right )-\LegendreP \left (n +1, x\right )\right )}{3 \left (\left (\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right )+\left (n^{2}+n -2\right ) x^{2} \hypergeom \left (\left [\frac {n}{2}+2, \frac {3}{2}-\frac {n}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right )\right ) \hypergeom \left (\left [-\frac {n}{2}+1, \frac {n}{2}+\frac {3}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right )-\frac {\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right ) \hypergeom \left (\left [-\frac {n}{2}+2, \frac {n}{2}+\frac {5}{2}\right ], \left [\frac {5}{2}\right ], x^{2}\right ) x^{2} \left (n +3\right ) \left (n -2\right )}{3}\right ) \left (1+x \right )^{3} \left (x -1\right )^{3}}d x \right )-\frac {\hypergeom \left (\left [-\frac {n}{2}+1, \frac {n}{2}+\frac {3}{2}\right ], \left [\frac {3}{2}\right ], x^{2}\right ) c_{1} x}{3}-\frac {\hypergeom \left (\left [\frac {n}{2}+1, -\frac {n}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], x^{2}\right ) c_{2}}{3}\right )\]