# 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.

-

If I may be allowed to propose a different approach that will simplify the integral, why not integrate by parts? Then we have

\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}

The last integral may be evaluated using a simple semicircular contouring the upper half-plane and applying the residue theorem.

-
That is a wonderful solution, but beyond the technical details, I am also interested in why anyone should even consider a logarithm in the hint to begin with. Do you have any intuition as to whether or not the hint can produce the solution to the integral? –  JessicaK Mar 20 '14 at 7:56
@JessicaK: I'm sure the hint can lead to the solution, but it seems a rather painful way to get there. My philosophy is to simplify the integral as much as possible before using multivalued functions requiring branch cuts. Arctangents usually may be simplified out using integration by parts. –  Ron Gordon Mar 20 '14 at 8:02
I have been so caught up in trying fancy contours that I forgot manipulating the original integral was even an option. Thank you. –  JessicaK Mar 20 '14 at 8:14
Just remember that $log(z) = log(||z||) + i .arctan (y/x)$. –  Yves Daoust Mar 20 '14 at 8:54