I asked this question on another forum but no answers so I'm copy/pasting it here in hopes that someone can help out
[Math] Inverse fourier transform – Where did the Heaviside function come from
fourier analysis
Related Solutions
The devil is in the details. When you write the integral $$\int_0^{\infty} \exp(-(x-iy)^2)$$ you can not simply say that $$\int_0^{\infty} \exp(-(x-iy)^2) = \frac 12 \int_{-\infty}^{\infty} \exp(-(x-iy)^2)=\frac{\sqrt \pi}{2},$$because it is false.
In fact, you obtain the imaginary error-function $\operatorname {erfi}$: $$\int_0^{\infty} \exp(-(x-iy)^2) = \frac 12 \int_{-\infty}^{\infty} \exp(-(x-iy)^2)=\frac 12 \sqrt \pi (1+i\operatorname {erfi}(y)),$$ and this additional complex-valued term would - after some manipulations - yield you the principal value of $\frac 1x$.
In my opininion, a safer way to deduce the Fourier transform would be to use the $sign$ function: $$H(x) = \frac 12 (1+ sign(x)),$$ and for the sign function you write that $( sign (x))' = \delta _0$, hence $i \xi F[ sign (x)](\xi) = F[\delta_0] = 1$. Then you can apply the well-known idea about the division by $\xi$ to get $$F[ sign (x)](\xi) = -i\,pv(1/\xi) + C\delta_0.$$ The sign function is odd, hence its Fourier transform must also be odd, so $C=0$.
Finally, $$F[H] = F\left[\frac 12 (1+ sign(x))\right] = \frac 12 (\delta_0 - i\,pv(1/\xi)).$$ The exact constants depend, of course, on your normalisation of the Fourier transform.
Note that we can write
$$\int_{-\infty}^\infty\frac{\sin(k)}{k}e^{ikx}\,dk=\frac{1}{2i}\int_{-\infty}^\infty\frac{e^{ik}-e^{-ik}}{k}e^{ikx}\,dk \tag1$$
Observe that for each of the principal value integrals
$$I_{\pm}(x)=\text{PV}\left(\int_{-\infty}^\infty\frac{e^{\pm ik}}{k}e^{ikx}\,dk\right)=\text{PV}\left(\int_{-\infty}^\infty\frac{e^{ ik(x\pm 1)}}{k}\,dk\right)$$
the integrand has a pole at $k=0$. To evaluate these integrals, we analyze the contour integrals
$$\begin{align} \oint_{C}\frac{e^{iz(x\pm 1)}}{z}\,dz&=\int_{-R}^{-\epsilon} \frac{e^{ik(x\pm 1)}}{k}\,dk+\int_{\epsilon}^{R} \frac{e^{ik(x\pm 1)}}{k}\,dk\\\\ &+\int_{\text{sgn}(x\pm 1)\pi}^0 \frac{e^{i\epsilon e^{i\phi}}}{\epsilon e^{i\phi}}\,i\epsilon e^{i\phi}\,d\phi\\\\ &+\int_0^{\text{sgn}(x\pm 1)\pi}\frac{e^{i R e^{i\phi}}}{R e^{i\phi}}\,iR e^{i\phi}\,d\phi \tag 2 \end{align}$$
As $R\to \infty$, the last integral on the right-hand side of $(2)$ tends to $0$. As $\epsilon\to 0$, the third integral on the right-hand side of $(2)$ tends to $-\text{sgn}(x\pm 1)\pi$. Therefore, we have
$$\text{PV}\left(\int_{-\infty}^\infty\frac{e^{ ik(x+ 1)}-e^{ik(x-1)}}{k}\,dk\right)=\text{sgn}(x+1)\pi-\text{sgn}(x-1)\pi=\begin{cases}2\pi &,|x|<1\\\\0&,|x|>1\\\\\pi&,|x|=1\end{cases} \tag 3$$
Substituting $(3)$ into $(1)$ yields
$$\int_{-\infty}^\infty\frac{\sin(k)}{k}e^{ikx}\,dk=\begin{cases}\pi &,|x|<1\\\\0&,|x|>1\\\\\pi/2&,|x|=1\end{cases} $$
Best Answer
Try in the opposite direction: \begin{align} \mathcal{F}(e^{-ax}H(x)) &=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-ax}H(x)e^{-isx}dx \\ & = \frac{1}{\sqrt{2\pi}}\int_{0}^{\infty}e^{-ax}e^{-isx}dx \\ & = \frac{1}{\sqrt{2\pi}}\int_{0}^{\infty}e^{-x(a+is)}dx \\ & = \frac{1}{\sqrt{2\pi}}\left.\frac{e^{-x(a+is)}}{a+is}\right|_{x=0}^{\infty} \\ & = \frac{1}{\sqrt{2\pi}}\frac{1}{a+is} \end{align} Because $\mathcal{F}^{-1}(\mathcal{F}(e^{-ax}H(x))=e^{-ax}H(x)$ (except at the discontinuity): $$ \mathcal{F}^{-1}\left(\frac{1}{\sqrt{2\pi}}\frac{1}{a+is}\right)=e^{-ax}H(x). $$ To see where $H(x)$ comes from using more general principles requires some background in Complex Analysis. If you like Fourier and Laplace transform analysis, you'd enjoy such a class. Complex Analysis is one of the most elegant subjects in Mathematics.