TITLE: The Fourier series $\sum_{n=1}^\infty (1/n)\cos nx$
QUESTION [14 upvotes]: The series $$\sum_{n=1}^\infty \frac{\sin nx}{n}$$ is the Fourier series of the odd 
$2\pi$-periodic extension of $(\pi-x)/2, 0<x<\pi$. 
My question is : $$\sum_{n=1}^\infty \frac{\cos nx}{n}$$ is the Fourier series of the
even $2\pi$-periodic extension of what function?

REPLY [6 votes]: The proof proposed by Winther is the method Euler used to derive 
$$
\sum_{n=1}^{\infty}\frac{\sin nx}{n}=\frac{\pi-x}{2}\quad (0<x<2\pi).
$$
This is often called the first Fourier series, since Euler mentioned it in a letter to Christian Goldbach as early as 1744. He published his proof only ten years later. Euler's derivation can be justified by integrating partial sums instead of infinite series, and this works also for the cosine series:
Integrate the identity
$$
\sum_{n=1}^N \sin nx = \frac{\cos \frac{x}{2}-\cos(N+\frac{1}{2})x}{2\sin \frac{x}{2}}
$$ 
from $\pi$ to $x\in(0,2\pi)$ to get
$$
\begin{split}\sum_{n=1}^N\frac{\cos nx}{n}&=\sum_{n=1}^N\frac{(-1)^n}{n}-\int_{\pi}^x\frac{\cos\frac{t}{2}-\cos(N+\frac{1}{2})t}
 {2\sin\frac{t}{2}}\mathrm{d}t\\
&=\sum_{n=1}^N\frac{(-1)^n}{n}-\log(\sin\frac{x}{2})+\int_{\pi}^x
\frac{\cos(N+\frac{1}{2})t}
 {2\sin\frac{t}{2}}\mathrm{d}t.
\end{split}
$$
The integral approches 0 for $N\to\infty$ (follows immediately from integrating by parts). We thus get
$$
 \sum_{n=1}^{\infty}\frac{\cos nx}{n}=-\log 2-\log(\sin\frac{x}{2}) \quad (0<x<2\pi).
$$
(The identity we start from can be derived without using the complex geometric series by
adding up
$\cos(n-\frac{1}{2})x-\cos(n+\frac{1}{2})x=2\sin nx\,\sin\frac{x}{2} \ (1\leq n\leq N)$.)