Fourier Series Package

The Wolfram Language 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 Wolfram Language kernel.

This package provides functions for numerical approximations of Fourier transforms, Fourier series, and discretetime Fourier transforms. The numerical approximations use the Wolfram Language'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 loads the package.
This gives a numerical approximation to the Fourier transform of with respect to at .

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
Wolfram Language default {0, 1}
general case {a, b}

Effect of FourierParameters setting on Fourier transform.

setting Fourier sine transform inverse Fourier sine transform
{0, 1}
{a, b}

Effect of FourierParameters setting on Fourier sine transform.

setting Fourier cosine transform inverse Fourier cosine transform
{0, 1}
{a, b}

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 th coefficient in the exponential series expansion
NFourierSinCoefficient[expr,t,n]find a numerical approximation to the n th coefficient in the sine series expansion
NFourierCosCoefficient[expr,t,n]find a numerical approximation to the n th 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 .
Here is a plot of the trigonometric polynomial over three periods.
NFourierCoefficient[expr,t,n]find a numerical approximation to the function Fn

Numerical approximation to FourierCoefficient.

Here is a plot of a periodic function of , with a period of .
You can use the FourierParameters option to specify the period of the function.

The Fourier transform from the discrete time domain into the continuous frequency domain is usually termed the discretetime Fourier transform. Just as the Z transform is the discrete analog of the Laplace transform, the discretetime Fourier transform is the discrete analog of the continuoustime Fourier transform. The option setting FourierParameters -> {a, b} 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 discretetime Fourier transform, for .