# Fourier Transform of Heaviside

I need help with a Fourier Transform.

I know Fourier Transform is defined by: $$F(\omega)=\int_{-\infty}^{\infty} f(t).e^{-i\omega t}\, dt$$ where $F(\omega)$ is the transform of $f(t)$.

Now, I need to calculate the Fourier Transform of: $$u(t+\pi) - u(t-\pi)$$

where $u$ is the Heaviside function.

With that, I have to calculate this:

$$\frac{2}{\pi}\int_{0}^{\infty}\frac{\sin{(a\pi)}}{a} \cos{(at)} \,da$$

Any help?

• Why not just calculate it directly? $\hat{h}(\omega) = \int_{-\pi}^\pi e^{-i \omega t} dt$. Just $\operatorname{sinc}$ your teeth into it. Feb 10 '15 at 16:41
• @copper.hat please, check again. The exercise didn't end there (I arrived to what you said) Feb 10 '15 at 16:48
• Well, formally (which means there is some justification required) you have $h(t) = {1 \over 2 \pi}\int_{-\infty}^\infty \hat{h}(\omega) e^{i \omega t} d \omega$. Now use the fact that $w \mapsto \operatorname{sinc} (\pi \omega)$ is even to 'get rid' of the $i\sin (\omega t)$ part. Feb 10 '15 at 16:53
• @copper.hat sorry, I didn't understand. I don't know what sinc means (I'm from Argentina, here we don't use that notation). Thanks Feb 10 '15 at 16:59
• It is $\operatorname{sinc} x = {\sin x \over x}$ for $x \neq 0$ and 1 for $x=0$. Feb 10 '15 at 17:01

Split the second integral into two pieces,

$$I(t)=\int_{0}^{\infty}\frac{\sin{\pi a}}{a}\cos(a t)da=\int_{0}^{\infty}\frac{1}{2a}\left(\sin(a(t+\pi))-\sin(a(t-\pi))\right)da$$

Due to the eveness of the integrand we get

$$4 I(t)=\int_{-\infty}^{\infty}\frac{1}{a}\sin(a(t+\pi))da-\int_{-\infty}^{\infty}\frac{1}{a}\sin(a(t-\pi))da=\\\ \underbrace{\Im\int_{-\infty}^{\infty}\frac{1}{a}e^{ia(t+\pi)}da}_{I_1}-\underbrace{\Im\int_{-\infty}^{\infty}\frac{1}{a}e^{ia(t-\pi)}da}_{I_2}$$

We can now apply residue theorem. There are two things we have to worry about:

-in which part of the Complex plane our integral converges

-How to avoid the singularity at $0$

We solve the second problem by adding a small semicircle at zero to avoid the divergence.

Now, lets's take $t+\pi>0$ for the moment then we have to close the contour in the upper half plane to calculate $I_1$. The result is

$$I_1= \pi i$$ If $t+\pi<0$ we have to close in the lhp. we get $$I_1=-\pi i$$ put together both cases yields $$I_1=\pi i \text{sign}(t+\pi)$$ A similiar reasoning for $I_2$ gives $$I_2=i\pi\text{sign}(t-\pi)$$ Collecting everything and taking imaginary parts completes our calculation $$I=\frac{\pi}{4}(\text{sign}(t+\pi)-\text{sign}(t-\pi))$$

Feel free to ask, if anything is unclear or look at this question of you

The function $f(t)=u(t+\pi)-u(t-\pi)$ is $1$ for $-\pi < t < \pi$ and is zero outside $[-\pi,\pi]$. So the Fourier transform of this function is $$\sqrt{2\pi}\hat{f}(s)=\left.\int_{-\pi}^{\pi}e^{-its}dt = \frac{e^{-its}}{-is}\right|_{t=-\pi}^{\pi}= \frac{e^{\pi is}-e^{-\pi is}}{is}=2\frac{\sin(\pi s)}{s}.$$ Therefore, the inverse transform of the forward transform of $f$ is \begin{align} \frac{f(x+0)+f(x-0)}{2} & =\lim_{R\rightarrow\infty}\frac{1}{2\pi}\int_{-R}^{R}2\frac{\sin(\pi s)}{s}e^{ixs}ds \\ & = \lim_{R\rightarrow\infty}\frac{1}{\pi}\int_{0}^{R}\frac{\sin(\pi s)}{s}(e^{ixs}+e^{-ixs})ds \\ & = \lim_{R\rightarrow\infty}\frac{2}{\pi}\int_{0}^{R}\frac{\sin(\pi s)}{s}\cos(xs)ds \\ & = \frac{2}{\pi}\int_{0}^{\infty}\frac{\sin(\pi s)}{s}\cos(xs)ds. \end{align}

Instead of adding a small semicircle, we can move the contour so that it avoids the singularity.

Since $\frac{\sin(a\pi)}a\cos(at)$ is even in $a$, \begin{align} \int_0^\infty\frac{\sin(a\pi)}a\cos(at)\,\mathrm{d}a &=\frac12\int_{-\infty}^\infty\frac{\sin(a\pi)}a\cos(at)\,\mathrm{d}a\\ &=\frac14\int_{-\infty}^\infty\frac1a\left[\vphantom{\frac12}\sin(a(\pi+t))+\sin(a(\pi-t))\right]\,\mathrm{d}a\tag{1} \end{align} Since $\frac{\sin(a\lambda)}a$ is odd in $\lambda$, we can assume that $\lambda\gt0$ and account for sign later.

Let $\gamma^+=[-R-i,R-i]\cup-i+Re^{i\pi[0,1]}$ and $\gamma^-=[-R-i,R-i]\cup-i+Re^{i\pi[0,-1]}$ as $R\to\infty$, then \begin{align} \frac14\int_{-\infty}^\infty\frac{\sin(a\lambda)}a\,\mathrm{d}a &=\frac14\int_{-\infty-i}^{\infty-i}\frac{\sin(a\lambda)}a\,\mathrm{d}a\\ &=\frac1{8i}\int_{-\infty-i}^{\infty-i}\frac1a e^{ia\lambda}\,\mathrm{d}a -\frac1{8i}\int_{-\infty-i}^{\infty-i}\frac1a e^{-ia\lambda}\,\mathrm{d}a\\ &=\frac1{8i}\int_{\gamma^+}\frac1z e^{iz\lambda}\,\mathrm{d}z -\frac1{8i}\int_{\gamma^-}\frac1z e^{-iz\lambda}\,\mathrm{d}z\\ &=\frac1{8i}(2\pi i)-\frac1{8i}(0)\\ &=\frac\pi4\tag{2} \end{align} Accounting for the sign of $\lambda$, we get $$\frac14\int_{-\infty}^\infty\frac{\sin(a\lambda)}a\,\mathrm{d}a =\frac\pi4\mathrm{sgn}(\lambda)\tag{3}$$ Using $(3)$ in $(1)$ gives $$\int_0^\infty\frac{\sin(a\pi)}a\cos(at)\,\mathrm{d}a =\frac\pi4\left[\vphantom{\frac\pi4}\mathrm{sgn}(\pi+t)+\mathrm{sgn}(\pi-t)\right]\tag{4}$$

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\dd}{{\rm d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,{\rm Li}_{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ Note that the Heaviside function $\ds{\,{\rm u}\pars{t}}$ can be written as $$\,{\rm u}\pars{t} =-\int_{-\infty}^{\infty} \frac{\expo{-\ic\omega t}}{\omega + \ic 0^{+}}\,\frac{\dd\omega}{2\pi\ic}$$ such that \begin{align}&\,{\rm u}\pars{t + \pi} - \,{\rm u}\pars{t - \pi} =\int_{-\infty}^{\infty}\frac{1}{2\pi\ic} \frac{\expo{\ic\omega\pi} - \expo{-\ic\omega\pi}}{\omega + \ic 0^{+}}\, \expo{-\ic\omega t}\,\dd\omega =\int_{-\infty}^{\infty}\frac{1}{\pi} \frac{\sin\pars{\pi\omega}}{\omega + \ic 0^{+}}\, \expo{-\ic\omega t}\,\dd\omega \\[5mm]&=\int_{-\infty}^{\infty} \frac{\sin\pars{\pi\omega}}{\pi\omega}\,\expo{-\ic\omega t}\,\dd\omega \\[1cm]&\frac{\sin\pars{\pi\omega}}{\pi\omega}\ \mbox{is the}\ {\it\mbox{Fourier Transform}}\ \mbox{of}\ \,{\rm u}\pars{t + \pi} - \,{\rm u}\pars{t - \pi}. \end{align}

Then, \begin{align}&\color{#66f}{\large% \frac{2}{\pi}\int_{0}^{\infty}\frac{\sin\pars{a\pi}}{a}\cos\pars{at}\,\dd a} =\int_{-\infty}^{\infty}\frac{\sin\pars{\pi a}}{\pi a}\cos\pars{at}\,\dd a =\Re\int_{-\infty}^{\infty}\frac{\sin\pars{\pi a}}{\pi a}\expo{-\ic at}\,\dd a \\[5mm]&=\Re\int_{-\infty}^{\infty}\braces{% \int_{-\infty}^{\infty}\bracks{\,{\rm u}\pars{x + \pi} - \,{\rm u}\pars{x - \pi}} \expo{\ic ax}\,\frac{\dd x}{2\pi}}\expo{-\ic at}\,\dd a \\[5mm]&=\Re\int_{-\infty}^{\infty}\bracks{% \,{\rm u}\pars{x + \pi} - \,{\rm u}\pars{x - \pi}}\ \overbrace{% \int_{-\infty}^{\infty}\expo{\ic\pars{x - t}a}\,\frac{\dd a}{2\pi}} ^{\dsc{\delta\pars{x - t}}}\ \,\dd x =\color{#66f}{\large\,{\rm u}\pars{t + \pi} - \,{\rm u}\pars{t - \pi}} \end{align}
However, $\ds{\,{\rm u}\pars{x} = \frac{\,{\rm sgn}\pars{x} + 1 }{2}}$ such that \begin{align}&\color{#66f}{\large% \frac{2}{\pi}\int_{0}^{\infty}\frac{\sin\pars{a\pi}}{a}\cos\pars{at}\,\dd a} =\color{#66f}{\large% \frac{\,{\rm sgn}\pars{t + \pi} - \,{\rm sgn}\pars{t - \pi}}{2}} \end{align}

Note that Wikipedia use the symbol $\ds{\,{\rm H}}$ for the Heaviside Step Function while the current use is $\ds{\Theta}$. Even $\ds{\tt Mathematica}$ calls it $\ds{\tt HeavisideTheta}$ and $\ds{\Theta\pars{x}}$ in its documentation.