Intereting Posts

Lines cutting regions
Prove triangle inequality using the properties of absolute value
What are examples of parallelizable complex projective varieties?
If both integers $x$ and $y$ can be represented as $a^2 + b^2 + 4ab$, prove that $xy$ can also be represented like this …
$\prod_{i=1}^{\infty}{1+(\frac{k}{i})^3}$ for integer k
How to prove that $\frac{\sin \pi x}{\pi x}=\prod_{n=1}^{\infty}(1-\frac{x^2}{n^2})$
Rubik's cube and counting
Recommending books for introductory differential geometry
inclusion of $\sigma$-algebra generated by random variables
Help me prove this inequality :
Showing that $\mathbb{R}$ and $\mathbb{R}\backslash\mathbb{Q}$ are equinumerous using Cantor-Bernstein
An application of Weierstrass theorem?
Elements of order 5 in $S_7$, odd permutations of order 4 in $S_4$, and find a specific permutation in $S_7$
What went wrong?
Can $\{(f(t),g(t)) \mid t\in \}$ cover the entire square $ \times $ ?

Consider

$$\int_0^{2\pi}\cos^n(x)\,dx,\qquad n\text{ a positive integer}$$

For $n$ odd, the answer is zero. Is there a slick way to find a closed form for $n$ even?

- On Reshetnikov's integral $\int_0^1\frac{dx}{\sqrtx\ \sqrt{1-x}\ \sqrt{1-x\,\alpha^2}}=\frac{1}{N}\,\frac{2\pi}{\sqrt{3}\,|\alpha|}$
- Evaluate $\int_0^1 \frac{x^k-1}{\ln x}dx $ using high school techniques
- what is the summation of such a finite sequence?
- How to solve $\lim_{x \rightarrow 0} {\frac{(1+x)^a-1}{x}}$?
- Interesting closed form for $\int_0^{\frac{\pi}{2}}\frac{1}{\left(\frac{1}{3}+\sin^2{\theta}\right)^{\frac{1}{3}}}\;d\theta$
- Proof of dilogarithm reflection formula $\zeta(2)-\log(x)\log(1-x)=\operatorname{Li}_2(x)+\operatorname{Li}_2(1-x)$

- Polynomial maximization: If $x^4+ax^3+3x^2+bx+1 \ge 0$, find the maximum value of $a^2+b^2$
- How to evaluate $ \int_0^1 {\log x \log(1-x) \log^2(1+x) \over x} \,dx $
- Confused about differentiability/continuity/partial derivative existence
- Proof for a particular integration result.
- Can we teach calculus without reals?
- Evaluate $\int_{0}^{+\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x}$
- Show that $a - b \mid f(a) - f(b)$
- Convex and bounded function is constant
- Suppose $a_n>0$ for $n\in \mathbb{N}$. Prove that $\prod_{n=1}^\infty (1+a_n)$ converges if and only if $\sum_{n=1}^\infty a_n<\infty$.
- How to integrate $\int_{0}^{\infty }{\frac{\sin x}{\cosh x+\cos x}\cdot \frac{{{x}^{n}}}{n!}\ \text{d}x} $?

Qiaochu Yuan’s hint seems to be the simplest approach: By the binomial theorem for any $n\geq0$ one has

$$2^n\cos^n x=(e^{ix}+e^{-ix})^n=\sum_{k=0}^n {n\choose k} (e^{ix})^k\ (e^{-ix})^{n-k}=\sum_{k=0}^n {n\choose k} e^{(2k-n)ix}\ .\qquad(*)$$

Since

$$\int_0^{2\pi}e^{i\ell x}\ dx=\cases{2\pi&$\quad(\ell=0)$\cr 0&$\quad(\ell\ne0)$\cr}$$

at most one term on the right of $(*)$ contributes to the integral $J_n:=\int_0^{2\pi}\cos^n x\ dx$. When $n$ is odd then $2k-n\ne0$ for all $k$ in $(*)$, therefore $J_n=0$ in this case. When $n$ is even then $k=n/2$ gives the only contribution to the integral, and we get

$$\int_0^{2\pi} \cos^n x\ dx={2\pi\over 2^n}{n\choose n/2}\ .$$

Funny enough, someone just posted a question on the Power-reduction formula two hours ago. Using that, you readily get the result

$$\frac{2\pi}{2^n}\binom{n}{n/2}\;.$$

It is also possible with partial integration, though getting the closed formula from the other solution is not as easy to see.

$$ C(n):=\int_0^{2\pi}\!\!\!\cos^n(x)\,dx =\int_0^{2\pi}\!\!\!\cos^{n-1}(x)\cos(x)\,dx $$

partial integration gives

$$ = (n-1)\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\sin^2(x)\,dx$$

$$ =(n-1)\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\left(1-\cos^2(x)\right)\,dx $$

$$ \Rightarrow \int_0^{2\pi}\!\!\!\cos^n(x)\,dx = \frac{n-1}{n}\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\,dx $$

So in short: $C(0)=2\pi$, $C(1)=0$ and

$$C(n)=\frac{n-1}{n}C(n-2) = \frac{(n-1)!!}{n!!} 2\pi\quad \text{for }n\text{ even} .$$

It’s possible to do this integral in a couples of lines using the residue theorem from complex analysis.

Details: The usual trick to do definite integrals going from $0$ to $2\pi$ is to let $\cos x = \dfrac {z^2 + 1} {2z}$ where $z = {\rm e} ^{{\rm i} x}$. This substitution also implies that ${\rm d} x = \dfrac {{\rm d} z} {{\rm i} z}$. Then this is reduced to the contour integral of $\left( \dfrac {z^2 + 1} {2z} \right) ^n \dfrac {{\rm d} z} {{\rm i} z}$ where the contour is the unit circle in the complex plane. Then you can expand this using the binomial theorem and get the coefficient of $\dfrac 1 z$ and apply the residue theorem to get the answer.

- Compact subset in colimit of spaces
- order of operations division
- Dynamic voting quorum
- A “reverse” diagonal argument?
- Proving that a polynomial is irreducible over a field
- Explicit Derivation of Weierstrass Normal Form for Cubic Curve
- What does $\bigcup_{i=0}^{\infty}$ mean?
- Definite integral: $\displaystyle\int^{4}_0 (16-x^2)^{\frac{3}{2}} dx$
- How find this $\sum\limits_{n=0}^{\infty}(-1)^{n}\left(\frac{1}{n+1}-\frac{1}{n+2}+\frac{1}{n+3}-\cdots\right)^{2}$
- Compactness of the Grassmannian
- Confused by the Bolzano Weierstrass Theorem
- A normed space is locally compact iff its closed unit ball is compact.
- Uncountable closed set of irrational numbers
- Every ${K}_{1, 3}$-free connected graph of even order has a perfect matching.
- Convergence of $\prod_{n=1}^\infty(1+a_n)$