Show that $\text{Res}_{z = \infty}\left(f(z)\log\left(\frac{z-a}{z-b}\right)\right) = - \int_{a}^{b}f(z)\,dz$ I would like to show that $\text{Res}_{z = \infty}\left(f(z)\log\frac{z-a}{z-b} \right)= - \int_{a}^{b}f(z)\,dz$, where $f(z)$ is an entire function and for $\log\left(\frac{z-a}{z-b}\right)$ we take any branch that is regular at $z = \infty$.
I have tried  using both definitions of the residue at infinity but have had no luck.
First I tried the integral definition:
$$\text{Res}_{z = \infty}\left(f(z)\log\frac{z-a}{z-b}\right) = \frac{-1}{2\pi i}\int_{C_r}f(z)\log\left(\frac{z-a}{z-b}\right) $$
But now I am unsure how to compute this integral. Breaking the logarithm up as a difference of two logs did not seem to help. I also tried to parametrize the circle of radius r and write this as a real integral. This got really messy.
Next, I tried the definition which uses the residue at $0$
$$\text{Res}_{z = \infty}\left(f(z)\log\left(\frac{z-a}{z-b}\right) \right)$$
$$ = - \text{Res}_{z = 0}\left(\frac{1}{z^2}f\left(\frac{1}{z}\right)\log\left(\frac{z^{-1}-a}{z^{-1}-b}\right)\right) $$
$$ = - \lim_{z \to 0} \left(\frac{1}{z}f\left(\frac{1}{z}\right)\log\left(\frac{1-az}{1-bz} \right)\right)$$
The above limit computation corresponds to there being a simple pole at $0$ which I'm not even sure is true.
And yet again, I am stuck. Any tips?
 A: 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.
A: 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.

A: Note that $f(z) = \frac{1}{2\pi i}\int_{C_R}\frac{f(w)}{w-z}dw$ where we take $C_R$ to be the circle of radius large enough to contain the line from $a$ to $b$. Then we have $\int_a^bf(z)dz = \int_a^b\frac{1}{2\pi i}\int_{C_R}\frac{f(w)}{w-z}dw dz$. We can use Fubini's theorem (why?) to swap the order of integration to get $\frac{-1}{2\pi i}\int_{C_R}f(w)(\log\frac{w-b}{w-a})dw$, where the negative sign comes out when integrating (that part is basic calculus). This is exactly equal to the residue at infinity of the integrand. Note that we have to take a branch cut of $\log\frac{w-b}{w-a}$ here - in particular it is regular at infinity. To do this, we can let this branch cut be the preimage of the principal branch under the transformation $\zeta = \frac{z-b}{z-a}$, which happens to be the segment from $a$ to $b$. This does not interfere with the integration since we picked the cut after integrating along this segment. 
