Message Boards Message Boards

1
|
4635 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

FourierTransform won't work

Posted 9 years ago

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?

POSTED BY: Sebastian Klein
5 Replies

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.

enter image description here

POSTED BY: Sebastian Klein

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 BY: Udo Krause

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 BY: Sebastian Klein

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 BY: Henrik Schachner

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]]
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract