This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 FOURIER SERIES PACKAGE TUTORIAL | Functions »

# Fourier Series Package

The Mathematica kernel provides the functions FourierTransform and InverseFourierTransform for computing the symbolic Fourier exponential transform and inverse transform. It also provides the functions FourierSinTransform, InverseFourierSinTransform, FourierCosTransform, and InverseFourierCosTransform for computing the symbolic Fourier sine and cosine transforms and their inverses. As of Version 7, FourierSeries and related functions are also included in the Mathematica kernel.
This package provides functions for numerical approximations of Fourier transforms, Fourier series, and discrete-time Fourier transforms. The numerical approximations use Mathematica's numerical integration and summation directly without first trying for an exact solution.
 NFourierTransform[expr,t,] find a numerical approximation to the Fourier transform of expr evaluated at the numerical value , where expr is treated as a function of t NInverseFourierTransform[expr,,t] find a numerical approximation to the inverse Fourier transform of expr evaluated at the numerical value t, where expr is treated as a function of NFourierSinTransform[expr,t,] find a numerical approximation to the Fourier sine transform of expr evaluated at the numerical value , where expr is treated as a function of t NInverseFourierSinTransform[expr,,t] find a numerical approximation to the inverse Fourier sine transform of expr evaluated at the numerical value t, where expr is treated as a function of NFourierCosTransform[expr,t,] find a numerical approximation to the Fourier cosine transform of expr evaluated at the numerical value , where expr is treated as a function of t NInverseFourierCosTransform[expr,,t] find a numerical approximation to the inverse Fourier cosine transform of expr evaluated at the numerical value t, where expr is treated as a function of

Finding numerical approximations to Fourier transforms.

This gives a numerical approximation to the Fourier transform of with respect to at .
 Out[2]=
In addition to supporting the NIntegrate options, the numerical Fourier transform functions support the option FourierParameters. This option allows you to choose among the various conventions used for defining Fourier transforms.
 case value Fourier transform and inverse Mathematica default general case

Effect of FourierParameters setting on Fourier transform.

 setting Fourier sine transform inverse Fourier sine transform

Effect of FourierParameters setting on Fourier sine transform.

 setting Fourier cosine transform inverse Fourier cosine transform

Effect of FourierParameters setting on Fourier cosine transform.

To calculate a numerical approximation to a Fourier series or coefficient, you can use numerical versions of the Fourier series functions which are given below. The numerical approximation functions accept the FourierParameters option, allowing you to specify the period.
 NFourierCoefficient[expr,t,n] find a numerical approximation to the n coefficient in the exponential series expansion NFourierSinCoefficient[expr,t,n] find a numerical approximation to the n coefficient in the sine series expansion NFourierCosCoefficient[expr,t,n] find a numerical approximation to the n coefficient in the cosine series expansion NFourierSeries[expr,t,k] find the exponential series expansion to order k using numerical approximations for the coefficients NFourierTrigSeries[expr,t,k] find the trigonometric series expansion to order k using numerical approximations for the coefficients

Finding approximate numerical values for Fourier coefficients and series.

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 .
 Out[3]=
Here is a plot of the trigonometric polynomial over three periods.
 Out[4]=
 NFourierCoefficient[expr,t,n] find a numerical approximation to the function

Numerical approximation to FourierCoefficient.

Here is a plot of a periodic function of , with a period of .
 Out[5]=
You can use the FourierParameters option to specify the period of the function.
 Out[6]=
The Fourier transform from the discrete time domain into the continuous frequency domain is usually termed the discrete-time Fourier transform. Just as the Z transform is the discrete analog of the Laplace transform, the discrete-time Fourier transform is the discrete analog of the continuous-time Fourier transform. The option setting FourierParameters can be used to specify the period.
Numerical approximations to these transforms are given below.
 NDTFourierTransform[expr,n,omega] find a numerical approximation to the function NInverseDTFourierTransform[expr,omega,n] find a numerical approximation to the function

Numerical approximations for discrete-time Fourier transforms.

Here is a numerical approximation to an inverse discrete-time Fourier transform, for .
 Out[7]=