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 exp (-t2)/ (1+ t ) with respect to  at =1.
| 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.
| | | |
| Mathematica default | {0, 1} | |
| | |
| general case | {a, b} | |
| | |
Effect of FourierParameters setting on Fourier transform.
Effect of FourierParameters setting on Fourier sine 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 nth coefficient in the exponential series expansion |
| NFourierSinCoefficient[expr,t,n] | find a numerical approximation to the nth coefficient in the sine series expansion |
| NFourierCosCoefficient[expr,t,n] | find a numerical approximation to the nth 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 1.
| Out[3]= |  |
|
Here is a plot of the trigonometric polynomial over three periods.
| Out[4]= |  |
|
Numerical approximation to FourierCoefficient.
Here is a plot of a periodic function of t, with a period of  .
| Out[5]= |  |
|
| 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 -> {a, b} can be used to specify the period.
Numerical approximations to these transforms are given below.
Numerical approximations for discrete-time Fourier transforms.
Here is a numerical approximation to an inverse discrete-time Fourier transform, for n=-5, ..., 5.
| Out[7]= |  |
|