Solving the improper integral $\int_0^{\infty} {e^{-ax}\cos{(bx)}} dx$ 
$$\int_0^{\infty} {e^{-ax}\cos{(bx)}} dx$$

I know I need to use integration by part method. But I'm not sure how does the improper integral take place?
 A: Just an idea:
$$\cos bx=\frac{e^{ibx}+e^{-ibx}}{2}\implies \int\limits_0^\infty e^{-ax}\cos bx\,dx=\frac{1}{2}\int\limits_0^\infty\left(e^{-(a-ib)x}+e^{-(a+ib)x}\right)dx=\ldots$$
Check the values of $\,a,b\,$ (reals, I presume...?) for which the above converges.
A: I assume $a$ and $b$ are real numbers, and $a>0$.
Since $\cos{bx}=\operatorname{Re}\{e^{-ibx}\}$, we get
$$
\int_0^\infty e^{-ax}\cos(bx)\,dx=
\operatorname{Re}\int_0^\infty e^{-(a+ib)x}\,dx=
\operatorname{Re}\left[-\frac{e^{-(a+ib)x}}{a+ib}\right]_0^\infty=
$$
$$
\operatorname{Re}\left\{\frac{1}{a+ib}\right\}=
\operatorname{Re}\left\{\frac{a-ib}{a^2+b^2}\right\}=
\frac{a}{a^2+b^2}.
$$
A: We can easily get this
$$\int \frac{\cos(bx)dx}{e^{ax}}=\frac{b\sin(bx)-a\cos(bx)}{(a^2+b^2)e^{ax}}+C$$
and you only need to get the limit to the infinity
$$\frac{b\sin(bx)-a\cos(bx)}{(a^2+b^2)e^{ax}}=\frac{\sqrt{a^2+b^2}\sin(bx+\phi)}{(a^2+b^2)e^{ax}}<\frac{\sqrt{a^2+b^2}}{(a^2+b^2)e^{ax}}$$
so
$$\lim_{x\rightarrow+\infty}\frac{\sqrt{a^2+b^2}\sin(bx+\phi)}{(a^2+b^2)e^{ax}}=0$$
