Lecture 1 Example: Taking Fourier Transforms with Mathematica

Find the Fourier transform of f(x) =(1/(σ√(2 π)))exp[-(1/2)(((((x-m)/σ)))^2)] .

ϕ(w)=∫(e^(iwx))(1/(σ√(2 π)))exp[-(1/2)(((((x-m)/σ)))^2)] dx

let y=(x-m)/σ and substitute into the integral to give:

ϕ(w)=(1/(√(2 π)))(e^(iwm))∫exp(iwσy)exp[-(y^2)/2] dy

There are two ways of proceeding from here:

(1) Using the Fourier Transform Function. This is pretty straightforward, but you have to be careful to keep track of the FT convention. The default used in Mathematica is not the same as the typical one in probability theory, so you need to change the “Fourier Parameters” as shown here. You can read more about this in the documentation (see also the “Details and Options” for information about the FourierParameters Option).
Documentation: https://reference.wolfram.com/language/ref/FourierTransform.html

(2) Do the integral by using the Integrate function. This is pretty convenient because Mathematica, by default, wants to do an analytical integral. It even does this when you use explicit bounds (infinite ones). You can read more about the integrate function in the documentation.
Documentation: https://reference.wolfram.com/language/ref/Integrate.html

Note that both of these should work in Wolfram Alpha.

Way 1: Using the FourierTransform function 
Note: this one is a bit tricky because of the sigma in the exponent because of the substitution. This doesn’t normally happen, so the “Fourier Parameters here are a bit weird.” But, you guys are smart. You can figure this out. Just read the documentation.

answer1=FourierTransform[(1/(√σ))Exp[((-(y^2))/2)],y,w,FourierParameters->{1,σ}]
Simplify[answer1, Assumptions-> σ>0]

Way 2: Use the Integrate function
I think the hardest part of this one is knowing how to input the imaginary number i and the ∞. You get i with an escape then ii then escape. You get ∞ with an escape then inf then escape. You get other symbols (e.g., greek letters) similarly.

answer2=Integrate[Exp[I w σ y]Exp[-((y^2)/2)],{y,-∞,∞}]