Show that the integral of the Fejer kernel from $-\pi$ to $\pi$ equals $2\pi$ We have the Fejer kernel $K_N(x) = \frac{1}{N+1} \frac{1 - \cos((N+1)x)}{1 - \cos(x)} $ where $ N \geq 0$ and need to show that $\frac{1}{2\pi} \int_{-\pi}^{\pi} K_N(x) dx = 1  $. I've tried the integral by playing around with the Taylor series representations of $\cos$ and $\cos(mx)$ to no avail. I then briefly looked up the Chebychev polynomial representations and that looked much to complicated for this problem. I'm currently trying it by induction but don't know if this will go anywhere.
By the way, this problem is in baby Rudin in ch. 8 "Some Special Functions" and is exercise 15.(b) on pg 199. But for some reason there is no solution to this anywhere online.
Any help is appreciated.
 A: It can be proved by using some triangular equations such as equation (\ref{1}) and equation (\ref{4}) below.
\begin{align}
1 - \cos((N+1)x=\sum_{n=1}^{N+1}[\cos(n-1)x-\cos nx]\\
=2\sum_{n=1}^{N+1}\sin {2n-1\over2}x\sin{x\over 2}. \tag{1}\label{1}
\end{align}
Take (\ref{1}) into the formula and get
\begin{align}
K_N(x) = \frac{1}{N+1} \frac{1 - \cos((N+1)x}{1 - \cos(x)}\\
={1\over N+1}{{2\sum_{n=1}^{N+1}\sin {2n-1\over2}x\sin{x\over 2}}\over{2\sin^2{x\over 2}}}\\
={1\over N+1}{{\sum_{n=1}^{N+1}\sin {2n-1\over2}x}\over{\sin{x\over 2}}} .\tag{2}\label{2}
\end{align}
Then the integral changes into 
$$
\int_{-\pi}^{\pi}K_N(x)\mathrm{d}x={1\over N+1}\sum_{n=1}^{N+1}\int_{-\pi}^{\pi} \frac{\sin{2n-1\over 2}x}{\sin {x\over 2}}\mathrm{d}x. \tag{3}\label{3}
$$
Now what all we need to do is to calculate $$\int_{-\pi}^{\pi} \frac{\sin{2n-1\over 2}x}{\sin {x\over 2}} \mathrm{d}x$$ for $n=1,\dots,N+1$.
Since 
$$
\frac{\sin{2n-1\over 2}x}{\sin {x\over 2}}=1+2\sum_{k=1}^{n-1}\cos kx \tag{4}\label{4}
$$
we get 
$$
\int_{-\pi}^{\pi} \frac{\sin{2n-1\over 2}x}{\sin {x\over 2}}\mathrm{d}x=2\pi.
$$
Take this result into (\ref{3}) we get the answer
$$
\int_{-\pi}^{\pi}K_N(x)\mathrm{d}x={1\over N+1}\sum_{n=1}^{N+1}\int_{-\pi}^{\pi} \frac{\sin{2n-1\over 2}x}{\sin {x\over 2}}\mathrm{d}x=2\pi. 
$$
