TITLE: Evaluating $\int_0^\infty \frac{\cos(ax)-e^{-ax}}{x \left(x^4+b^4 \right)}dx$
QUESTION [11 upvotes]: How can we evaluate 
$$\int_0^\infty \frac{\cos(ax)-e^{-ax}}{x \left(x^4+b^4\right)}dx \quad a,b>0$$
using Complex Analysis? This problem was given in a Complex Analysis book which I was reading. The answer given in it is
$$\frac{\pi}{4b^4}e^{-ab/\sqrt{2}}\sin \left(\frac{ab}{\sqrt{2}} \right)$$
Which function and contour should we consider?

REPLY [10 votes]: The following is an evaluation that does not use contour integration.
Let $ \displaystyle I(a) = \int_{0}^{\infty} \frac{\cos (ax) - e^{-ax}}{x(x^{4}+b^{4})} \ dx$.
Then differentiating under the integral sign, $$ \begin{align} I^{(4)}(a)+b^{4}I(a) &= \int_{0}^{\infty} \frac{\cos(ax)-e^{-ax}}{x} \ dx \\ &= \text{Ci}(ax) - \text{Ei}(-ax) \Bigg|^{\infty}_{0} \\ &= \lim_{x \to \infty} \left( \frac{\sin ax}{ax} + \mathcal{O}(x^{-2})\right) -\lim_{x \to 0^{+}} \Big(ax + \mathcal{O}(x^{2}) \Big) \\ &= 0 \end{align}$$ where $\text{Ci}(x)$ is the cosine integral and $\text{Ei}(x)$ is the exponential integral.
The characteristic equation of the above linear homogeneous differential equation is $r^{4}+b^{4}=0$, which has roots $ r= \frac{b}{\sqrt{2}} ( \pm 1 \pm i )$.
The general solution of the differential equation is therefore $$ \begin{align} I(a) &= C_{1}e^{ab/ \sqrt{2}} \cos \left(\frac{ab}{\sqrt{2}} \right) + C_{2}e^{ab/ \sqrt{2}} \sin \left(\frac{ab}{\sqrt{2}} \right)+C_{3}e^{-ab/ \sqrt{2}} \cos \left(\frac{ab}{\sqrt{2}} \right)\\ &+C_{4}e^{-ab/ \sqrt{2}} \sin \left(\frac{ab}{\sqrt{2}} \right). \end{align}$$
But since $I(a)$ remains finite as $a \to \infty$, $C_{1}$ and $C_{2}$ must be zero.
To find the constants $C_{3}$ and $C_{4}$ we can use the initial conditions $I(0)=0$ and $$ \begin{align} I'(0) = \int_{0}^{\infty} \frac{1}{x^{4}+b^{4}} \ dx &= \frac{1}{b^{4}} \int_{0}^{\infty}  \frac{1}{(\frac{x}{b})^{4}+1} \ dx \\ &= \frac{1}{b^{3}} \int_{0}^{\infty} \frac{1}{u^{4}+1} \ du \\ &= \frac{1}{b^{3}}\frac{\pi}{4} \csc \left( \frac{\pi}{4}\right) \\ &= \frac{\pi \sqrt{2}}{4b^{3}}. \end{align} $$
To satisfy the first initial condition, $C_{3}$ must be zero.
And using the second initial condition we have $$ \frac{\pi \sqrt{2}}{4b^{3}} = C_{4}\frac{b}{\sqrt{2}},$$
which implies $$C_{4} =  \frac{\pi}{4b^{4}}.$$
Therefore,
$$ I(a) = \int_{0}^{\infty} \frac{\cos (ax) - e^{-ax}}{x(x^{4}+b^{4})} \ dx = \frac{\pi}{{\color{red}{2}}b^{4}} e^{-ab/ \sqrt{2}} \sin \left(\frac{ab}{\sqrt{2}} \right).$$