How to solve this integral step by step: $$\int_{-1}^{1} (x^k) (1-x^2)^{(n/2)-2}dx=??? $$
In my text book, it shows the result like below:
$$\int_{-1}^{1} (x^k) (1-x^2)^{(n/2)-2}dx= \frac{(x^{(1+k)} ~_2F_1((1+k)/2, ~2-n/2, ~(3+k)/2, ~x^2))}{(1+k)} ; for ~x=-1~to~1~$$
$$=\frac{((1+(-1)^k) ~\Gamma(\frac{1+k}{2}) ~\Gamma(\frac{-1+n}{2})}{2Γ( \frac{1}{2}(-1+k+n))}$$
Note: $~_2F_1((1+k)/2, ~2-n/2, ~(3+k)/2, ~x^2)$ is a hypergeometric function, is there a simple way to find and solve that integral?
Thanks in advanced
Following Daniel's comments:
Case $1$ --- $\;k\ge 0\;$ is odd: In this case, the integrand $\;x^k(1-x^2)^{\frac n2-2}\;$ is an odd continuous function in a symmetric interval and thus the integral equals zero.
Case $2$ --- $\;k=2m\ge 0\;$ is even: in this case our integral equals twice the integral over half the interval and we can substitute:
$$u:=x^2\implies dx=\frac{du}{2\sqrt u}\implies$$
$$\int\limits_{-1}^1 x^k(1-x^2)^{\frac n2-2}dx=2\int\limits_0^2 (x^2)^m(1-x^2)^{\frac n2-2}dx=$$
$$2\int\limits_0^1u^m(1-u)^{\frac n2-2}\frac{du}{2u^{1/2}}=\int\limits_0^1u^{m-1/2}(1-u)^{\frac n2-2}du=:B\left(\frac{k+1}2\,,\,\color{}{\frac{n-2}2}\right)$$
and, for example using the relation between gamma and beta functions, we have
$$B\left(\frac{k+1}2\,,\,\frac{n-2}2\right)=\frac{\Gamma\left(\frac{k+1}2\right)\Gamma\left(\frac{n-2}2\right)}{\Gamma\left(\frac{k+n-1}2\right)}$$