# Evaluating trigonometric integral using residues

I am trying to evaluate for real positive $\alpha,\beta$

$$\int_{0}^{\infty}\arctan\left(\frac{\alpha}{x}\right)\sin(\beta x)dx$$

using a hint to consider

$$\int \log\left(\frac{z+ia}{z}\right) e^{ibz}dz$$

with a branch cut from $0$ to $z=-ia$. However, I am having a lot of difficulty understanding why this hint is useful. I have tried to construct a semicircle contour on the upper halfplane with a smaller semicircle to avoid the point $z=0$ and I have having difficulty on a couple of fronts.

First, I cannot seem to conclude that when my smaller semi circle tends to zero, that this section of the contour contributes nothing to the integral, but based on past experience I don't see why it is not true. However, even if I suppose the upper and lower semi circle arcs do not contribute to the integral in the limit, I am left with (since there are no poles in my contour)

$$\int_{-\infty}^{\infty} \log\left(\frac{x+i\alpha}{x}\right) e^{i\beta x}dx = \int_{-\infty}^{\infty}\log\left(\frac{x+i\alpha}{x}\right)(\cos(\beta x) + i\sin(\beta x))dx = 0.$$

From here, it seems like I need to evaluate either $$\int_{-\infty}^{\infty} \log\left(\frac{x+i\alpha}{x}\right)\cos(\beta x)dx \qquad (1)$$ or $$\int_{-\infty}^{\infty} i\log\left(\frac{x+i\alpha}{x}\right)\sin(\beta x)dx \qquad (2)$$ using contour integration again to get further. If I were to accomplish that, since $\log((x+i\alpha)/x))$ is not an odd or even function, I don't know how I could further reduce my limits of integration to $0$ to $\infty$ to match the limits of integration of my original integral. Even further still, if I were to manage all of this, I don't see how it would introduce a $\arctan(\alpha/x)$ into the expression so I can arrive at an answer. I tried to let $\gamma$ be the solution to (1) and see if this would lead to $\arctan$ showing up eventually, but doing this made it seem like I would not get anywhere.

-

\begin{align}\int_0^{\infty} dx \, \arctan{\frac{\alpha}{x}} \sin{\beta x} &= -\frac1{\beta}\left [\arctan{\frac{\alpha}{x}} \cos{\beta x} \right ]_0^{\infty} -\frac{\alpha}{\beta}\int_0^{\infty} dx \, \frac{\cos{\beta x}}{x^2+\alpha^2}\\ &= \frac{\pi}{2 \beta} - \frac{\alpha}{2 \beta} \int_{-\infty}^{\infty}dx \frac{e^{i \beta x}}{x^2+\alpha^2} \\ &= \frac{\pi}{2 \beta} \left (1-e^{-\alpha \beta} \right ) \end{align}
Just remember that $log(z) = log(||z||) + i .arctan (y/x)$. – Yves Daoust Mar 20 '14 at 8:54