Integral of $x^2\cos^n x$ over $[-\pi,\pi]$

163 Views Asked by At

Is there a closed form (or in terms of some special functions) of the following definite integral? $$\int_{-\pi}^{\pi}x^2\cos^nx~\mathrm{d}x$$

where $\cos^nx$ is the $n-$th power of cosine, and $n$ is a positive integer.

3

There are 3 best solutions below

2
On BEST ANSWER

Too long for a comment.

I suppose that this would be given in terms of some hypergeometric functions.

However, having a look at "Table of Integrals, Series, and Products" (seventh edition) by I.S. Gradshteyn and I.M. Ryzhik, at the bottom of page 214, there is an interesting recurrence relation for the antideivative $$\int x^m\cos^n(x)\,dx=\frac{x^{m-1} \cos ^{n-1}(x) (m \cos (x)+n x \sin (x))}{n^2} +\frac{(n-1)}n\int x^m \cos ^{n-2}(x)\,dx-$$ $$\frac{m(m-1) }{n^2}\int x^{m-2} \cos ^n(x)\,dx$$

Applied to $m=2$, this would give $$I_n=(-1)^n\frac{4 \pi }{n^2}-\frac{2 \sqrt{\pi } \left(1+(-1)^n\right) \Gamma \left(\frac{n+1}{2}\right)}{n^2\, \Gamma \left(\frac{n+2}{2}\right)}+\frac{n-1}n I_{n-2}$$ with $I_0= \frac{2 \pi ^3}{3}$ and $I_1= -4\pi$.

This means that $$I_{2n}=\frac{\pi }{n^2}-\frac{\sqrt{\pi }\, \Gamma \left(n+\frac{1}{2}\right)}{n^3 \Gamma (n)}+\frac{2n-1}{2n} I_{2n-2}$$ $$I_{2n+1}=-\frac{4 \pi }{(2 n+1)^2}+\frac{2n}{2n+1} I_{2n-1}$$

Edit

In terms of hypergoemetric functions, at least $$I_{2n+1}=-\frac{\pi \, 2^{1-2 m}}{(2 m+1)^2}\,\,\, _3F_2\left(-2 m-1,-m-\frac{1}{2},-m-\frac{1}{2};\frac{1}{2}-m,\frac{1}{2}-m;-1\right)$$

0
On

Hint:

Using the complex representation and the binomial development,

$$x^2(e^{ix}+e^{-ix})^n=x^2\sum_{k=0}^n\binom nke^{ikx}e^{-i(n-k)x}=x^2\sum\binom nke^{i(2k-n)x}.$$

If $n$ is even, the central term in the summation is a constant, and it can be handled separately.

Then if you integrate by parts on the exponentials, the new integral to be considered is $$2x\sum\binom nk\frac{e^{i(2k-n)x}}{i(2k-n)}.$$ After a second integration by parts, you get the integrand

$$2\sum\binom nk\frac{e^{i(2k-n)x}}{i(2k-n)^2},$$

of which an antiderivative is

$$2\sum\binom nk\frac{e^{i(2k-n)x}}{i(2k-n)^3}.$$

For arguments $x=\pm\pi$, the exponentials reduce to $\pm1$, and the final integral will be a linear combination of powers of $\pi$ (up to the third) with rational coefficients that are finite sums of weighted binomial coefficients.

I would be surprised if there was an easy closed-form.

0
On

For odd $n$, $$\int_{-\pi}^\pi x^2 \cos^n x \,dx = \sum_{k = 0}^n \int_{-\pi}^\pi x^2 \,2^{-n} \binom n k e^{i k x} e^{-i (n - k) x} dx = \sum_{k = 0}^n \frac {(-1)^n 2^{2 - n} \pi \binom n k} {(n - 2k)^2} = \\ \frac {(-1)^n 2^{2 - n} \pi} {n^2} \,{_3F_2} \!\left( -n, -\frac n 2, -\frac n 2; 1 - \frac n 2, 1 - \frac n 2; -1 \right).$$ For $n = 2m$, $$\int_{-\pi}^\pi x^2 \cos^n x dx = \sum_{k = 0 \atop k \neq m}^{2m} \frac {2^{2 - 2m} \pi \binom {2m} k} {(2m - 2k)^2} + \frac {2^{1 - 2m} \pi^3 \binom {2m} m} 3 = \\ \frac {\sqrt \pi \,\Gamma \!\left( \frac {n + 1} 2 \right)} {3 \Gamma \!\left( \frac n 2 + 2 \right)} \left( 3n \,{_4F_3} \!\left( 1, 1, 1, 1 - \frac n 2; 2, 2, 2 + \frac n 2; -1 \right) + \pi^2 (n + 2) \right).$$