TITLE: Complicated definite integral involving exponential and trig function
QUESTION [6 upvotes]: I stumbled upon this complicated looking integral while trying to solve an assignment for extra credit in Calculus.
$$\int^\infty_0 \frac{e^{-5x}- \cos x}{x} dx$$
I tried breaking it into two parts in order to deal with each separately. I tried the only substitution that made sense to me, but got nothing. Integrating by parts still yielded no significant progress. I thought about using Gamma and Beta functions, but I can't see how to build them up in this particular case
Last thing I tried before coming here for help was Taylor series, I thought that might help me get something more familiar...
Any ideas?

REPLY [3 votes]: Using
$$
\frac1x=\int_0^\infty e^{-tx}\,\mathrm{d}t
$$
we get
$$
\begin{align}
\int_0^\infty\frac{e^{-5x}-\cos(x)}{x}\mathrm{d}x
&=\int_0^\infty\int_0^\infty\left(e^{-5x}-\cos(x)\right)e^{-tx}\,\mathrm{d}t\,\mathrm{d}x\\
&=\int_0^\infty\int_0^\infty\left(e^{-5x}-\cos(x)\right)e^{-tx}\,\mathrm{d}x\,\mathrm{d}t\\
&=\int_0^\infty\left(\frac1{5+t}-\frac{t}{1+t^2}\right)\,\mathrm{d}t\\
&=\lim_{a\to\infty}\int_0^a\left(\frac1{5+t}-\frac{t}{1+t^2}\right)\,\mathrm{d}t\\
&=\lim_{a\to\infty}\left[\log\left(\frac{5+a}5\right)-\frac12\log\left(1+a^2\right)\right]\\
&=\lim_{a\to\infty}\frac12\log\left(\frac{25+10a+a^2}{1+a^2}\right)-\log(5)\\[6pt]
&=-\log(5)
\end{align}
$$