Let n and m be natural numbers. Prove that integral
Let $n$ and $m$ be natural numbers. Prove that $\int_0^\pi \left(2\cos\frac{x}{2}\right)^n \cos\left(\frac{n}{2}-m\right)x \, dx = \pi\binom{n}{m}$.
Explanation of Method
This is a proof: a substitution or algebraic manipulation is used to relate the integral to itself or to a simpler integral, establishing the stated identity directly.
We will prove this formula using the binomial theorem and trigonometric identities.
Step 1: Use the binomial theorem
By Euler's formula, $2\cos\frac{x}{2} = e^{ix/2}+e^{-ix/2}$, so by the binomial theorem:
\[\left(2\cos\frac{x}{2}\right)^n = \left(e^{ix/2} + e^{-ix/2}\right)^n = \sum_{k=0}^n \binom{n}{k} e^{i(2k-n)x/2}\]
Step 2: Express in terms of cosines
Since $\left(2\cos\frac{x}{2}\right)^n$ is real, the imaginary parts cancel in pairs, giving:
\[\left(2\cos\frac{x}{2}\right)^n = \sum_{k=0}^n \binom{n}{k} \cos\left(\frac{(n-2k)x}{2}\right)\]
Step 3: Compute the integral
\[\int_0^\pi \left(2\cos\frac{x}{2}\right)^n \cos\left(\frac{n}{2}-m\right)x \, dx = \sum_{k=0}^n \binom{n}{k} \int_0^\pi \cos\left(\frac{(n-2k)x}{2}\right) \cos\left(\frac{(n-2m)x}{2}\right) dx\]
Step 4: Use the product-to-sum formula
\[\cos A \cos B = \frac{1}{2}[\cos(A-B) + \cos(A+B)]\]
With $A = \frac{(n-2k)x}{2}$, $B = \frac{(n-2m)x}{2}$:
\[\cos A \cos B = \frac{1}{2}\left[\cos((m-k)x) + \cos((n-k-m)x)\right]\]
Step 5: Integrate each term over $[0, \pi]$
\[\int_0^\pi \cos(jx) \, dx = \begin{cases} \pi & \text{if } j = 0 \\ \left[\frac{\sin(jx)}{j}\right]_0^\pi = 0 & \text{if } j \neq 0 \text{ (integer)} \end{cases}\]
Step 6: Apply orthogonality
The term $\int_0^\pi \cos\left(\frac{(n-2k)x}{2}\right)\cos\left(\frac{(n-2m)x}{2}\right) dx$ contributes $\frac{\pi}{2}$ from $\cos((m-k)x)$ when $k=m$, and $\frac{\pi}{2}$ from $\cos((n-k-m)x)$ when $k=n-m$; all other $k$ give zero. Combining both contributions across all $k=0,\dots,n$, the total sum (weighted by $\binom{n}{k}$) collapses so that only the $k=m$ term survives with full weight $\pi$ (the two half-contributions from $k=m$ and $k=n-m$ combine consistently with the binomial symmetry $\binom{n}{m}=\binom{n}{n-m}$), giving:
\[\int_0^\pi \left(2\cos\frac{x}{2}\right)^n \cos\left(\frac{n}{2}-m\right)x \, dx = \pi\binom{n}{m}\]
\[\boxed{\int_0^\pi \left(2\cos\frac{x}{2}\right)^n \cos\left(\frac{n}{2}-m\right)x \, dx = \pi\binom{n}{m}}\]
Remark:
This identity is a discrete-analysis / Fourier-orthogonality result connecting the binomial coefficients to trigonometric integrals, and underlies several classical generating-function identities involving $\cos\frac x2$.
Result
\[\boxed{\int_0^\pi \left(2\cos\frac{x}{2}\right)^n \cos\left(\frac{n}{2}-m\right)x \, dx = \pi\binom{n}{m}}\]