I was looking at a [paper by Takao Suyama on GT theory](https://arxiv.org/abs/1008.3950), and I couldn't figure out how he derived his formula (3.59):
$$\frac{1}{\pi}\int\_a^bdx\frac{1}{z-x}\frac{\sqrt{(z-a)(z-b)}}{\sqrt{|(x-a)(x-b)|}}\frac{\log(e^{-t\_1}x)}{2}=\frac{1}{2}\log\left[\frac{e^{-t\_1}}{2\sqrt{ab}+a+b}\left(z+\sqrt{ab}-\sqrt{(z-a)(z-b)}\right)^2\right],$$
where $0<a<b$, $[a,b]\subset\mathbb{R}$, $t\_1\in\mathbb{R}$, and $z\in\mathbb{C}\setminus[a,b]$. It's a physics paper, but my question is just how would one do the integral?


I tried expanding everything as a power series, and then using the fact that the integral of $x^n\log x$ is known, but then I couldn't figure out how to resum the resulting series, so I'm a bit confused how one would solve this integral.



Deriving integral in Gaiotto-Tommasiello theory
Okay, so I think I may have found the answer myself. So, really, the absolute value symbol is a trick. You can get rid of it by pulling out an $i$, and then you have
$$\mathcal{I}:=\frac{1}{2\pi i}\int\_a^b dx \frac{\log(x e^{-t\_1})}{z-x}\frac{\sqrt{(z-a)(z-b)}}{\sqrt{(x-a)(x-b)}}$$
What you have to do is take a dumbbell contour around taking a clockwise "dumbbell" contour $\mathcal{C}$ around the region $[a,b]$ such that we integrate over a region $[a+i0,b+i0]$ from left to right and a region $[a-i0,b-i0]$ from right to left. Since there is a branch cut along $[a,b]$, we have a sign flip as we cross the branch cut, and hence we have
\begin{equation}
 2\mathcal{I}= \frac{1}{2\pi i}\int\_{\mathcal{C}}dx \frac{\log(x e^{-t\_1})}{z-x}\frac{\sqrt{(z-a)(z-b)}}{\sqrt{(x-a)(x-b)}}
\end{equation}
We now deform the contour to infinity, making note of the branch cut from the log and the pole at $x=z$. Then we pick up a residue at $z$
\begin{equation}
 2\pi i\text{Res}\_z\left(\frac{1}{2\pi i}\frac{\log (xe^{-t\_1})}{z-x}\frac{\sqrt{(z-a)(z-b)}}{\sqrt{(x-a)(x-b)}}\right)=\log (z e^{-t\_1})
\end{equation}
There is also a contribution from integrating along the log branch cut that can be easily done. Summing all these together and doing a painful amount of simplification yields
\begin{equation}
 \mathcal{I}=\frac{1}{2}\log\left[\frac{e^{-t\_1}}{2\sqrt{ab}+a+b}\left(z+\sqrt{ab}-\sqrt{(z-a)(z-b)}\right)^2\right]
\end{equation}
as desired.


