How does the Herglotz trick work? 
There is a series representation as partial fraction expansion where just translated reciprocal functions are summed up, such that the poles of the cotangent function and the reciprocal functions match:
     $$ \pi \cdot \cot (\pi x) = \lim_{N\to\infty}\sum_{n=-N}^N \frac{1}{x+n}. $$
  This identity can be proven with the Herglotz trick.

Sounds funny, especially when you understand german (sorry Gustav ;-), but how does it work?
 A: I give a pretty detailed proof in this answer, but I am not sure what the Herglotz trick is.
I found a description of the Herglotz trick on the web and it seems to be the method I employed there. That is, look at enough similarities of the functions so that they have to be the same.
A: The Herglotz trick is basically to define
$$f(x):=\pi\cot\pi x,\quad g(x):=\lim_{N\to\infty}\sum_{n=-N}^N \frac{1}{x+n}$$
and derive enough common properties of these functions to see in the end that they must coincide. Namely, it consists of showing that:


*

*$f$ and $g$ are defined for all non-integral values and are continuous there.

*They are periodic of period 1.

*They are odd functions.

*They satisfy the same functional relation $f(\frac{x}{2})+f(\frac{x+1}{2})=2f(x)$ and $g(\frac{x}{2})+g(\frac{x+1}{2})=2g(x)$.

*By defining $h(x)=f(x)-g(x)$, and setting $h(x):=0$ for $x\in\mathbb{Z}$, $h$ becomes a continuous function on all of $\mathbb{R}$ that shares the properties given in (2), (3), and (4).


Now the "trick" is to use all these properties as follows. Since $h$ is a periodic continuous function, it possesses a maximum $m$. Let $x_0$ be a point in $[0,1]$ with $h(x_0)=m$. It follows from (4) that
$$h\left(\frac{x_0}{2}\right)+h\left(\frac{x_0+1}{2}\right)=2m,$$
and hence that $h(\frac{x_0}{2})=m$. Iteration gives $h(\frac{x_0}{2^n})=m$ for all $n$, and hence $h(0)=m$ by continuity. But $h(0)=0$, and so $m=0$, that is, $h(x)\leq 0$ for all $x\in\mathbb{R}$. As $h(x)$ is an odd function, $h(x)<0$ is impossible, hence $h(x)=0$ for all $x\in\mathbb{R}$.
