# Fourier Transform of a Step Function

I'm trying to obtain the form of a sinc function that I know I'm supposed to get in Mathematica. I'm doing this because I intend to do a lot with Fourier transforms (FT) and I'd like to know I'm not missing constants or something of the like.

For example, consider: $$f(x) = \begin{cases} A && -\frac{a}{2} ≤ x ≤ \frac{a}{2}\\ 0 && \text{otherwise}\\ \end{cases}$$

Employing the following:

FourierTransform[UnitStep[a/2 + x] UnitStep[a/2 - x], x, k, FourierParameters -> {1, -1}]


It gives: (2 Sin[(a k)/2] UnitStep[a])/k

Is this Mathematica's way of giving the sinc function? I guess I was expecting something more like (2 Sin[(a k)/2])/(k a). I know there are different parameters that can be used, but none of them have given the form I was expecting.

When I try to do the FT directly as an integral:

Integrate[A Exp[-I k x], {k, -a/2, a/2}]


It gives: (2 A Sin[(a x)/2])/x

Are these the same? I was expecting something that would lead to $\rm{sinc}[k a/2]$. I have not found previous questions that can help, and the documentation in Mathematica (version 8) also has not helped either.

-
Since 'a' could be negative, that UnitStep factor is appropriate. To be rid of it add Assumptions->a>0 to the FT. –  Daniel Lichtblau Sep 12 '12 at 15:08
Thanks, I added that and the result now look like this: (2 Sin[(a k)/2])/k –  fiz Sep 12 '12 at 15:31
That appears to be equivalent to Sinc[a*k/2]/a, which means it is probably fine (I am not willing to wade through the parameter specs to prove this though). –  Daniel Lichtblau Sep 12 '12 at 15:44
Reduce[(2 Sin[(a k)/2])/k == Sinc[a*k/2]/a] –  belisarius Sep 12 '12 at 15:57

In Mathematica there is a designated function for this, UnitBox,

PiecewiseExpand[UnitBox[x]]


which gives expected result without assumptions:

FourierTransform[UnitBox[x/a], x, k, FourierParameters -> {1, -1}]


Abs[a] Sinc[(a k)/2]

There is actually a set of designated functions:

FourierTransform[UnitTriangle[x/a], x, t, FourierParameters -> {1, 1}]


Abs[a] Sinc[(a t)/2]^2

FourierSinCoefficient[#[x], x, n, FourierParameters -> {1, 2 Pi}] & /@
{TriangleWave, SawtoothWave, SquareWave}


-
nice, I didn't know about UnitBox... I've always defined my own rect function with the above piecewise definition –  rm -rf Sep 13 '12 at 15:57

There is no inconsistency here. If you assume a to be positive, as Daniel mentioned, you get the same answer:

FourierTransform[UnitStep[a/2 + x] UnitStep[a/2 - x], x, k,
FourierParameters -> {1, -1}, Assumptions -> a > 0]
(* (2 Sin[(a k)/2])/k *)

Integrate[UnitStep[a/2 + x] UnitStep[a/2 - x] Exp[-I k x],
{x, -∞, ∞}, Assumptions -> a > 0]
(* (2 Sin[(a k)/2])/k *)


Note that:

$$\frac{2\sin(a k/2)}{k} = \frac{a \sin (ak/2)}{ak/2} = a \text{sinc}(ak/2)$$

-