I want to prove following statement from exercises book:
Let $f$ be analytic on $\mathbb{C}$
$$\text{res}_{\infty} f(z) \ln\frac{z-b}{z-a} = \int_a^bf(z)$$ (for any branch of the logarithm $\ln$).
There are more statements like this but i struggle even with this and want help with it so maybe i could solve following by myself. I know that residue at infinity plus residues at finite amount of points is zero, so
$$-\text{res}_{\infty} f(z) \ln\frac{z-b}{z-a} = \text{res}_{a} f(z) \ln\frac{z-b}{z-a} + \text{res}_{b} f(z) \ln\frac{z-b}{z-a}$$
I can(? can I do it with branching function like log?) replace residues with integral of $f(z) \ln\frac{z-b}{z-a}$ going around points $a$ and $b$ multiplied on constant $\frac{1}{2\pi i}$. But even after this move I don't know how to move forward.
The problem with your approach is that the logarithm doesn't have isolated singularities at $a,b$ so we cannot really talk about residues there; while there may be a clever solution, personally I would just bash it out from the definitions using the Taylor series of the logarithm near $0$
We assume wlog $a \ne b$ as $a=b$ clearly implies both sides are zero.
Let $f(z)=\sum_{k \ge 0} {c_kz^k}$ and $\log (1-az) = -\sum_{m \ge 1} (az)^m/m$ and same for $b$, first expansion holding on the plane, the others near $0$ on a small disc where $2|az| < 1, 2|bz| <1$ say
By defintion $\text{res}_{\infty} f(z) \ln\frac{z-b}{z-a}=-\text{res}_{0} \frac{f(1/z)}{z^2} \log\frac{1-bz}{1-az}$, while on our small disc near zero, $\log\frac{1-bz}{1-az}=\log (1-bz)- \log(1-az)-c$ for some constant $c$ depending on the branch; by inspection $\frac{f(1/z)}{z^2}$ has Laurent terms starting with power $-2$, so $c$ is immaterial as it generates no residue and we will ignore it.
Since we have absolute convergence near zero, we get:
$-\text{res}_{0} \frac{f(1/z)}{z^2} \log\frac{1-bz}{1-az}=-\text{res}_{0}[(\sum_{k \ge 0}c_k/z^{k+2})(-\sum_{m \ge 1} (bz)^m/m+\sum_{m \ge 1} (az)^m/m)]$
We can multiply term by term and identify the terms that generate residues which are precisely $-k-2+m=-1$ or $m=k+1$, while we pass the minus around to put the $b$ terms with plus and the $a$ terms with minus, so we get:
$\text{res}_{\infty} f(z) \ln\frac{z-b}{z-a}=\sum_{k \ge0}c_k\frac{b^{k+1}-a^{k+1}}{k+1}=\int_a^b(\sum_{k \ge 0}{c_kz^k})dz=\int_a^bf(z)dz$, where we take the integral on the straight line (by Cauchy it doesn't matter of course) and we are done!