This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Add-ons / Standard Packages / Calculus  /


The Fourier transform is commonly used to transform a problem from the "time domain" into the "frequency domain" in which the amplitude (or more generally, a complex number including phase information) is given as a function of frequency. The Fourier transform may be viewed as the continuous analog of the Fourier series decomposition, which expresses a periodic function as a superposition of trigonometric functions. This package can be used to compute the analytic Fourier transform and Fourier series of functions. To do discrete Fourier transforms of lists of data you should use the built-in Fourier and InverseFourier functions. To do Laplace transforms you can use the package Calculus`LaplaceTransform`.

The Fourier transform and its inverse.

  • This loads the package.
  • In[1]:= <<Calculus`FourierTransform`

  • This gives the Fourier transform of

  • In[2]:= FourierTransform[Exp[-a^2 t^2], t, w]


  • Here is the inverse transform of the previous expression.
  • In[3]:= InverseFourierTransform[%, w, t]


  • The transform of a constant gives a delta function.
  • In[4]:= FourierTransform[5, t, w]


    FourierTransform recognizes the Dirac delta function DiracDelta and the unit step function UnitStep. These functions are discussed in the section on the Calculus`DiracDelta` package.

  • The convention is to make the assumptions about parameters necessary for the transform to exist. Here

    is assumed to be negative.
  • In[5]:= FourierTransform[Exp[a Abs[t]], t, w]


  • Assumptions about parameters can be made by defining Positive, Negative, or Sign for a parameter. When

    is defined to be positive, the Fourier transform of this double exponential does not exist.
  • In[6]:= (a /: Sign[a] = 1;
    FourierTransform[Exp[a Abs[t]], t, w])


    There are various conventions in the literature regarding the use of constants in the Fourier and related transforms. You can adjust these constants by giving new values to the global objects $FourierOverallConstant and $FourierFrequencyConstant or setting the options FourierOverallConstant and FourierFrequencyConstant. If these constants have values and , respectively, then the convention used in this package for the Fourier transform of a function, , is . The inverse transform is . Both and have a default value of 1. Other common choices for these constants are , and ,

    . The use of constants in the sine and cosine transforms is analogous to their use in the full Fourier transform.

    The Fourier sine and cosine transforms.

  • Here is the plot of a function defined for positive

  • In[7]:= fplt = Plot[Log[t]/(t^2 + 4), {t, .1, 10}]

  • This is the function's Fourier cosine transform. It contains a special function.
  • In[8]:= FourierCosTransform[Log[t]/(t^2 + 4), t, w]


  • Because the exponential integral function is built into Mathematica, we can immediately plot the transform.
  • In[9]:= Plot[%, {w, .1, 10}]

    Multidimensional FourierTransform and InverseFourierTransform.

  • Here is a multidimensional Fourier transform of a function of two variables.
  • In[10]:= FourierTransform[t1^2 Exp[-3 t2] UnitStep[t1, t2],
    {t1, t2}, {w1, w2}]


    While you can take the Fourier transform of any function for which the integral converges, you can only compute Fourier series for periodic functions. As is the case with the Fourier transform, there are differing conventions regarding the form of the various Fourier series. In this package the exponential Fourier series of a function , considered as periodic on the interval , is given as . The constants are called the Fourier coefficients. The trigonometric Fourier series of a real-valued function is defined similarly using only nonnegative

    . If your real-valued function is even or odd, then its trigonometric series will contain only cosines or sines, respectively.

    Computing Fourier and related series.

  • Here is a plot of the fractional part of a real number. It is a periodic function with fundamental interval from to

  • In[11]:= frplt = Plot[x - Floor[x], {x, 0, 3}]

  • This gives a piece of the Fourier trigonometric series of the fractional part function.
  • In[12]:= FourierTrigSeries[x, {x, 0, 1}, 3]


  • The plot of the truncated series is similar to that of the function.
  • In[13]:= Plot[%, {x, 0, 3}]

  • Here are the two plots on the same axes.
  • In[14]:= Show[frplt, %]

    Getting an approximate numerical value for Fourier integrals and series.

    In certain circumstances you will not want an exact or symbolic transform or series but rather a numerical one. In these cases you can use the numerical versions of the Fourier transform and series functions. These functions use Mathematica's numerical routines directly without first trying for an exact solution. These functions will also be useful if the functions in your problem do not have Fourier series or transforms that can be evaluated in explicit symbolic or exact form.

  • Here is a piece of the trigonometric series of a function that looks like on the interval from to . The function elsewhere is obtained by repeating this with period

  • In[15]:= NFourierTrigSeries[Sin[Cos[x]],
    {x, 0, 1}, 3]


  • Here is a plot of the trigonometric polynomial over three periods.
  • In[16]:= Plot[%, {x, 0, 3}]