# FourierTransform won't work

Posted 8 years ago
4346 Views
|
5 Replies
|
3 Total Likes
|
 Hi folks,I've got a little problem with Mathematicas FourierTransform. I've defined a rectangular function with help of the HeavisideTheta-Function. Square[t_] := 1/2 * HeavisideTheta[(-t^2 + 1)] When trying to FourierTransform it with FourierTransform[Square[t], t, \[Omega]] All I get is FourierTransform[1/2 HeavisideTheta[1 - t^2], t, 1] After looking through the examples I tried FourierTransform[1, t, \[Omega]] for testing purposes, but again all I got out was FourierTransform[1, t, 1] More oddly, when I emailed my two rows of code to a guy at my University, they worked for him the way expected. Any ideas what's going on here?
5 Replies
Sort By:
Posted 8 years ago
 Thanks for your answer and thanks for your hint with upper cases. Sadly, it still won't work. I copied your corrected functions into a new notebook, but still won't get a proper result.
Posted 8 years ago
 Unbelievable! Then you should to research whether FourierTransform is a command available in the $\mathit{Mathematica}$ $\mathit{Student}$ $\mathit{Edition}$. If something tends to absurdity, it might have a legal reason.
Posted 8 years ago
 Luckily, somebody else came with a solution which actually works. Clear @"Global*" Square[t_] := 1/2*HeavisideTheta[(-t^2 + 1)] FourierTransform[Square[t], t, \[Omega]] So seems like something messed mathematica up which needed correction.
Posted 8 years ago
 Hi Sebastian,the problem seems to be that your new variable had a value, i.e. you obviously executed before \[omega]=1 Starting a new notebook does not change that. Clearing all variables - as you did in your solution - does make the difference! Therefore it is a good idea (and often seen) to start every "new" notebook with the command ClearAll["Global*"] Henrik
Posted 8 years ago
 Square is a built-in function. Do yourself a favour by letting start your own symbols with lower-case letters. In[2]:= sQuare[t_] := 1/2*HeavisideTheta[(-t^2 + 1)] In[3]:= FourierTransform[sQuare[t], t, \[Omega]] Out[3]= Sin[\[Omega]]/(Sqrt[2 \[Pi]] \[Omega]) In[4]:= FourierTransform[1, t, \[Omega]] Out[4]= Sqrt[2 \[Pi]] DiracDelta[\[Omega]]