# How to find Fourier series in Mathematica

Fourier [list]

finds the discrete Fourier transform of a list of complex numbers.

Fourier [list, {p1, p2,…}]

returns the specified positions of the discrete Fourier transform.

• The discrete Fourier transform vs of a list ur of length n is defined by default to be ure2πi (r-1) (s-1) / n
• Note that the zero frequency term appears at position 1 in the resulting list.
• Other definitions are used in some scientific and technical fields.
• Different choices of definitions can be specified using the FourierParameters option.
• With the setting FourierParameters -> {a, b}, the discrete Fourier transform computed by Fourier is ure2πib (r-1) (s-1) / n
• Some common choices for {a, b} are {0,1} (default), {-1,1} (data analysis), {1, -1} (signal processing).
• The setting effectively corresponds to conjugating both input and output lists.
• To ensure a unique inverse discrete Fourier transform, b must be relatively prime to n. "
• The list of data supplied to Fourier need not have a length equal to a power of two.
• The list given in Fourier [list] can be nested to represent an array of data in any number of dimensions.
• The array of data must be rectangular.
• If the elements of the list are exact numbers, Fourier begins by applying N to them.
• Fourier [list, {p1, p2,…}] Is typically equivalent to Extract [Fourier [list], {p1, p2, ...}]. Cases with just a few positions p are computed using an algorithm that takes less time and memory but is more subject to numerical error, particularly when the length of list is long.
• Fourier can be used on Sparse Array objects.
open allclose all

### Basic Examples (2)

Find a discrete Fourier transform:

Find a power spectrum:

### Scope (3)

x is a list of real values:

Compute the Fourier transform with machine arithmetic:

Compute using 24-digit precision arithmetic:

Compute a 2D Fourier transform:

x is a rank 3 tensor with nonzero diagonal:

Compute the 3D Fourier transform:

### Fourier parameters (2)

No normalization:

Normalization by :

Normalization by :

Data from a sinc function with noise:

Ordinary spectrum without normalization:

Partial spectrum:

### Computing Spectra (6)

Fourier spectrum of "white noise":

Show the logarithmic spectrum, including the first (DC) component:

The spectrum of a "pulse" is completely flat:

2D power spectrum of a nested pattern:

Plot the nested pattern:

Find the logarithmic power spectrum:

Find the Fourier transform of the rule 30 cellular automaton pattern:

Logarithmic power spectrum:

### Filtering Data (1)

Compute discrete cyclic convolutions to smooth a discontinuous function with a Gaussian:

Compute the cyclic convolution:

Show the original and smoothed function:

The convolution is consistent with ListConvolve:

### Frequency Identification (1)

Here is some periodic data with some noise:

Find the maximum modes in the spectrum:

Get the position corresponding to positive frequencies and show the position on a plot of the spectrum:

Find a high-resolution spectrum between modes where the maximum was found:

Determine the period from the frequencies:

### Computing Eigenvectors (1)

m is a circulant differentiation matrix:

Because , the eigenvalues ​​of m are:

The eigenvectors are the columns of the DFT matrix, so Fourier diagonalizes m:

This allows very efficient computation of MatrixExp [m, r] for a particular vector:

Show the approximate evolution of the heat equation on the unit interval:

### Properties & Relations (6)

Inverse Fourier inverts Fourier:

For real inputs, all elements after the first come in complex conjugate pairs:

The power spectrum is symmetric:

Cyclic convolution corresponds to multiplication of Fourier transforms: