Show that $\text{Res}_{z = \infty}\left(f(z)\log\left(\frac{z-a}{z-b}\right)\right) = - \int_{a}^{b}f(z)\,dz$

Cauchy's integral formula says:

$$f(z) = \frac{1}{2\pi i}\oint_{C}\frac{f(w)dw}{w-z}$$

where $C$ is a counterclockwise contour encircling the point $z$. Integrating both sides from $z = a$ to $b$, assuming that the contour $C$ contains the entire interval gives:

$$\int_a^b f (z)dz = \frac{1}{2\pi i}\oint_{C}\log\left(\frac{w-a}{w-b}\right)f(w)dw$$

The r.h.s. is minus the sum of all residues outside of the contour of the integrand, since $f(z)$ is assumed to be analytic, this is therefore equal to minus the residue at infinity.

One can use this formula (or a generalized version involving a weight function) to derive quadrature rules without having to go through the formalism involving orthogonal polynomials. I've explained this here.


First, the residue at infinity can be written as

$$\text{Res}\left(f(z)\log\left(\frac{z-a}{z-b}\right),z=\infty\right)=\text{Res}\left(-\frac1{z^2}f(1/z)\log\left(\frac{1-az}{1-bz}\right),z=0\right)$$


Second, inasmuch as $f$ is entire, we can write $f(z)=\sum_{n=0}^\infty \frac{f^{(n)}(0)z^n}{n!}$ whereupon integrating term by term reveals

$$\int_a^b f(z)\,dz=\sum_{n=0}^\infty \frac{f^{(n)}(0)}{(n+1)!}\left(b^{n+1}-a^{n+1}\right)\tag1$$


Third, writing $\log(1-x)=-\sum_{n=1}^\infty \frac{x^n}n$, we have

$$\begin{align} -\frac{1}{z^2}f\left(\frac1z\right)\log\left(\frac{1-az}{1-bz}\right)&=-\sum_{m=0}^\infty \frac{f^{(m)}(0)}{m!\,z^m}\sum_{n=1}^\infty \frac{b^nz^{n-2}-a^nz^{n-2}}{n}\\\\ &=-\sum_{m=0}^\infty \sum_{n=0}^\infty \frac{f^{(m)}(0)}{m!}\frac{b^{n+1}z^{n-m-1}-a^{n+1}z^{n-m-1}}{n+1}\tag2 \end{align}$$


The residue of $(2)$ at $0$ is the coefficient on the $z^{-1}$ term, which occurs when $n=m$. Hence, using $(2)$ we find that

$$\text{Res}\left(f(z)\log\left(\frac{z-a}{z-b}\right),z=\infty\right)=-\sum_{n=0}\frac{f^{(n)}(0)}{(n+1)!}\left(b^{n+1}-a^{n+1}\right)\tag3$$

Comparing $(1)$ and $(3)$ yields the coveted identity

$$\text{Res}\left(f(z)\log\left(\frac{z-a}{z-b}\right),z=\infty\right)=-\int_a^b f(z)\,dz\tag4$$

as was to be shown!

The minus sign on the integral in $(4)$ is a consequence of the reversal of orientation upon the transformation $z\mapsto 1/z$ when using the residue at infinity.