Please kindly take some time to read this long question.
Suppose I have a meromorphic function $f$.
Let $\gamma$ be a rectifiable closed curve. Suppose $f$ and $\ln(z-s)$ are continuous on $\gamma$. ($s$ is a constant.) $\gamma$ contains some poles.
Consider the integral $I$ $$I=\oint_\gamma f(z)\ln(z-s)dz$$
Clearly $I$ converges.
Integration by parts for contour integral is $$\oint_\gamma f’(z)g(z)dz=-\oint_\gamma f(z)g’(z)dz$$
$$I=\oint (z-s)’f(z)\ln(z-s)dz=-\oint (z-s)f’(z)\ln(z-s)dz-\oint(z-s)f(z)\frac1{z-s}dz$$ due to integration by parts.
Perform integration by parts again on the first integral, $$I=-\oint f(z)dz+\oint\frac{(z-s)^2}2f’(z)\frac{dz}{z-s}+\oint \frac{(z-s)^2}2 f’’(z)\ln(z-s)dz$$
By repeated integration by parts, $$I=\sum^N_{k=0}\oint\frac{(-1)^{k+1}f^{(k)}(z)(z-s)^k}{(k+1)!}dz+(-1)^{N+1}\oint \frac{(z-s)^{N+1}f^{(N+1)}(z)\ln(z-s)}{(N+1)!}dz$$
But, again, by integration by parts, $$\oint f^{(k)}(z)(z-s)^kdz =(-1)^kk!\oint f(z)dz$$
So we have $$I=-\sum^N_{k=0}\frac1{k+1}\oint f(z)dz+ (-1)^{N+1}\oint \frac{(z-s)^{N+1}f^{(N+1)}(z)\ln(z-s)}{(N+1)!}dz $$
As you can see, as $N\to\infty$, the integral with logarithm tend to zero but the first term diverges as harmonic series.
Thank you for reading this long question completely. What’s the problem? Why does the convergent integral becomes divergent?
Any help will be appreciated.