# Assumptions don't work as expected in FourierTransform

The 2D rectangular function and its Fourier Transform is

$$g_{in}(x,\,y) = rect(\frac{x}{x0}) \, rect(\frac{y}{y0}) \quad \xrightarrow{\mathscr{F}} \quad G_{in}(u,v) = x0 \, y0 \, sinc(\pi u x0) \, sinc(\pi v y0)$$

where $x0 > 0$ and $y0 >0$.

I tried out this relation with Mathematica's built-in ForierTransform function (UnitBox is a Mathematica implementation of the rectangular function):

In:= FourierTransform[UnitBox[x/x0] UnitBox[y/y0], {x, y}, {u, v}, FourierParameters -> {0, 2*Pi}]

Out= Abs[x0] Abs[y0] Sinc[\[Pi] u x0] Sinc[\[Pi] v y0]


This not only is in agreement with the relation but also reveals the general cases where $x0$ or $y0$ is not positive. This result was cross-checked using the definition of Fourier Transform:

In:= Integrate[UnitBox[x/x0] UnitBox[y/y0] Exp[-I 2 Pi (u x + v y)], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]


Out is nothing but a longer version of Out: $$\begin{cases} \tag{Out} -\frac{\sin (\pi u \text{x0}) \sin (\pi v \text{y0})}{\pi ^2 u v} & (\text{x0}>0\land \text{y0}<0)\lor (\text{x0}<0\land \text{y0}>0) \\ \frac{\sin (\pi u \text{x0}) \sin (\pi v \text{y0})}{\pi ^2 u v} & (\text{x0}>0\land \text{y0}>0)\lor (\text{x0}<0\land \text{y0}<0) \\ 0 & \text{True} \end{cases}$$

So far, it seems that FourierTransform saves me from a hassle of typing Integrate, Exponent, etc., and yields a succinct representation. However, FourierTransform fails my expectation when Assumptions -> x0 && y0 is thrown in it:

In:= FourierTransform[UnitBox[x/x0] UnitBox[y/y0], {x, y}, {u, v}, FourierParameters -> {0, 2*Pi}, Assumptions -> {x0 > 0 && y0 > 0}]

Out= Abs[x0] Abs[y0] Sinc[\[Pi] u x0] Sinc[\[Pi] v y0]


This is strange because the first two terms in the output should be without Abs's with the aforesaid assumption, like this:

In:= Simplify[FourierTransform[UnitBox[x/x0] UnitBox[y/y0], {x, y}, {u, v}, FourierParameters -> {0, 2*Pi}], Assumptions -> {x0 > 0 && y0 > 0}]

Out= x0 y0 Sinc[\[Pi] u x0] Sinc[\[Pi] v y0]


or this:

In:= Integrate[UnitBox[x/x0] UnitBox[y/y0] Exp[-I 2 Pi (u x + v y )], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, Assumptions -> {x0 > 0 && y0 > 0}]

Out= (Sin[\[Pi] u x0] Sin[\[Pi] v y0])/(\[Pi]^2 u v)


From this simple example, it seems that the Assumptions option in FourierTransform does not work as usually expected. Can anyone give me a hint on what's happening in the function?

• @ herrpark: it is not uncommon that MMA "forgets" Assumptions made under e.g. an integral. The remedy is to simplify the resulting expression with the same Assumption: Simplify[%, {x0 > 0, y0 > 0}]. So, just say it twice (Goethe's Faust recommended even "Du musst es dreimal sagen" to take effect) ;-) – Dr. Wolfgang Hintze Sep 25 '15 at 12:12
• @Dr. Wolfgang Hintze Thanks for the suggestion. Now I wonder whether there are some features that enable me to step into and out of a function that we do, say, in Visual Studio. Stepping through a function would give me some information on intermediate steps it takes. – herrpark Sep 25 '15 at 12:53
• The Trace family can be used sometimes for debugging, and there is a built-in debugger in the Evaluation menu. However, it is not a very convenient one. The Mathematica workbench seems to have a better one. – Sjoerd C. de Vries Sep 25 '15 at 22:17
• It's always great for me to have a new message. Thanks and Mathematica workbench seems promising to me. I will give it a try. – herrpark Sep 30 '15 at 0:01