How to integrate cosine with a real exponent?

63 Views Asked by At

$$\int_{-\pi/2}^{+\pi/2}(\cos x)^rdx, \space\space(r>1,\space r \text{ is real})$$

I googled a lot, but only integer exponent cases found.

In my calculation, by using $\cos x = \frac{1}{2}(e^{ix}+e^{-ix})$ and Binomial theorem,

$$2^{-r}\sum_{k=0}^{\infty}\binom{r}{k}\frac{\sin(\frac{\pi}{2}r)}{k-r/2} $$

I am NOT sure it is correct, because when $r=2n$ it looks like 0.

And I know the integral is $2, \frac{\pi}{2},\frac{3}{8}\pi... \text{ when } r = 1, 2, 4...$

Can anyone correct my calculation? or Is there another way to evaluate the integral without infinite series or binomial coefficients thing?