# Compute the following integral given the Fourier transform of $f$

I'm using given the following definition of the Fourier transform: $$\hat{f}(k)=F[f]=\int_{\mathbb{R}} f(x)e^{-ikx} \, dx$$

I'm then asked to find the transform of the function defined by $$\begin{cases} e^{-x} & x>0 \\ 0 & x<0\end{cases}$$

I have done this and got $$F[f]=\frac{1}{1+ik}$$

I'm then asked to use the inversion formula $$F^{-1}[\hat{f}]=\frac{1}{2\pi}\int_{\mathbb{R}} \hat{f}(k)e^{ikx} \, dk$$ to compute $$\int_{0}^{\infty}\frac{\cos kx+k\sin kx}{1+k^2} \, dk$$

How do I do this part?

We have the Fourier Transform pair

$$f(x)=e^{-x}u(x)\leftrightarrow F(k)=\frac{1}{1+ik}$$

Denote the unit step function by $u(x)$. Then, we see that

\begin{align} e^{-x}u(x)&=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{e^{-ikx}}{1+ik}\,dk\\\\ &=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{e^{-ikx}}{1+ik}\frac{1-ik}{1-ik}\,dk\\\\ &=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{e^{-ikx}(1-ik)}{1+k^2}\,dk\\\\ &=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{(\cos(kx)-i\sin(kx))(1-ik)}{1+k^2}\,dk\\\\ &=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{\cos(kx)+k\sin(kx)}{1+k^2}\,dk-i\frac{1}{2\pi}\underbrace{\int_{-\infty}^\infty\frac{k\cos(kx)+\sin(kx)}{1+k^2}}_{=0\,\,\text{since we have an odd integrand}}\,dk\\\\ &=\frac{1}{2\pi}\int_{-\infty}^\infty\frac{\cos(kx)+k\sin(kx)}{1+k^2}\,dk \end{align}

Therefore, we find that

$$\int_{-\infty}^\infty\frac{\cos(kx)+k\sin(kx)}{1+k^2}\,dk=2\pi e^{-x}u(x)$$

Couple of hints:

$e^{ik} = \cos k + i\sin k$

and $F[f]$ can be re-written

$\displaystyle \frac {1-ik}{1+k^2}$