---
title: "FourierCoefficient"
language: "en"
type: "Symbol"
summary: "FourierCoefficient[expr, t, n] gives the n\\[Null]^th coefficient in the Fourier series expansion of expr. FourierCoefficient[expr, {t1, t2, ...}, {n1, n2, ...}] gives a multidimensional Fourier coefficient."
keywords: 
- Fourier series
- Fourier expansion
- Fourier exponential series
- Fourier exponential expansion
- orthogonal function series
- orthogonal function expansion
- Joseph Fourier
- boundary value problem
- Sturm-Liouville problem
canonical_url: "https://reference.wolfram.com/language/ref/FourierCoefficient.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Fourier Analysis"
    link: "https://reference.wolfram.com/language/guide/FourierAnalysis.en.md"
  - 
    title: "Integral Transforms"
    link: "https://reference.wolfram.com/language/guide/IntegralTransforms.en.md"
related_functions: 
  - 
    title: "FourierSeries"
    link: "https://reference.wolfram.com/language/ref/FourierSeries.en.md"
  - 
    title: "FourierSinCoefficient"
    link: "https://reference.wolfram.com/language/ref/FourierSinCoefficient.en.md"
  - 
    title: "Fourier"
    link: "https://reference.wolfram.com/language/ref/Fourier.en.md"
  - 
    title: "FourierTransform"
    link: "https://reference.wolfram.com/language/ref/FourierTransform.en.md"
  - 
    title: "SeriesCoefficient"
    link: "https://reference.wolfram.com/language/ref/SeriesCoefficient.en.md"
  - 
    title: "Integrate"
    link: "https://reference.wolfram.com/language/ref/Integrate.en.md"
---
# FourierCoefficient

FourierCoefficient[expr, t, n] gives the n$$^{\text{th}}$$ coefficient in the Fourier series expansion of expr.

FourierCoefficient[expr, {t1, t2, …}, {n1, n2, …}] gives a multidimensional Fourier coefficient.

## Details and Options

* The $n$$$^{\text{th}}$$ coefficient in the Fourier series expansion of $f(t)$ is by default given by $\frac{1}{2\pi }\int _{-\pi }^{\pi }f(t) e^{-i n t}dt$.

* The $m$-dimensional Fourier coefficient is given by $\frac{1}{(2\pi )^m}\int _{-\pi }^{\pi }\int _{-\pi }^{\pi }\cdots  f\left(t_1,t_2,\ldots \right) e^{-i \left(n_1 t_1+n_2 t_2+\cdots \right)}dt_1dt_2\cdots$.

* In the form ``FourierCoefficient[expr, t, n]``, ``n`` can be symbolic or an integer.

* The following options can be given:

|                    |               |                                                                   |
| ------------------ | ------------- | ----------------------------------------------------------------- |
| Assumptions        | \$Assumptions | assumptions on parameters                                         |
| FourierParameters  | {1, 1}        | parameters to define Fourier series                               |
| GenerateConditions | False         | whether to generate results that involve conditions on parameters |

* The function ``expr`` is assumed to be periodic in ``t`` with period $2 \pi$, except when otherwise specified by ``FourierParameters``.

* Common settings for ``FourierParameters`` include:

|     |     |     |
| --- | --- | --- |
| {1, 1} | (1/2π)∫-ππf(t) e^-i n td t | default settings |
| {1, -2Pi} | ∫-(1/2)(1/2)f(t) e^i 2π n td t | period 1 |
| {a, b} | $\left\| \frac{b}{2 \pi }\right\| ^{\frac{a+1}{2}}\int _{-\frac{\pi }{\| b\| }}^{\frac{\pi }{\| b\| }}f(t) e^{-i b n t}dt$ | general setting |

---

## Examples (12)

### Basic Examples (2)

Find the 5$$^{\text{th}}$$ Fourier coefficient:

```wl
In[1]:= FourierCoefficient[t ^ 2 + t, t, 5]

Out[1]= -(2/25) - (I/5)
```

Find the coefficient of the general term in a Fourier series:

```wl
In[2]:= FourierCoefficient[t ^ 2 + t, t, n]

Out[2]= Piecewise[{{Pi^2/3, n == 0}}, ((-1)^n*(2 + I*n))/n^2]
```

Plot the sequence:

```wl
In[3]:= DiscretePlot[Abs[%], {n, -10, 10}, PlotRange -> All]//Quiet

Out[3]= [image]
```

---

Find the ``{3, 5}`` Fourier coefficient:

```wl
In[1]:= FourierCoefficient[E ^ (-x - Abs[y]), {x, y}, {3, 5}]

Out[1]= -(((1/260) - (3 I/260)) E^-π (1 + E^π) Sinh[π]/π^2)
```

Find the coefficient of the general term:

```wl
In[2]:= FourierCoefficient[E ^ (-x - Abs[y]), {x, y}, {m, n}]

Out[2]= ((-1)^m E^-π ((-1)^1 + n + E^π) Sinh[π]/(1 + I m) (1 + n^2) π^2)
```

Plot the absolute value of coefficients:

```wl
In[3]:= ListPointPlot3D[Abs[Table[%, {m, -5, 5}, {n, -5, 5}]], Filling -> Bottom, PlotRange -> All, DataRange -> {{-5, 5}, {-5, 5}}]

Out[3]= [image]
```

### Scope (4)

Find the 3$$^{\text{rd}}$$ Fourier coefficient for an exponential function:

```wl
In[1]:= FourierCoefficient[E ^ (-t), t, 3]

Out[1]= -(((1/10) - (3 I/10)) Sinh[π]/π)
```

---

General Fourier coefficient for a Gaussian function:

```wl
In[1]:= FourierCoefficient[E ^ (-4t ^ 2), t, n]

Out[1]= (I E^-(n^2/16) (Erfi[(n/4) - 2 I π] - Erfi[(n/4) + 2 I π])/8 Sqrt[π])

In[2]:= DiscretePlot[%, {n, -15, 15}, Ticks -> {Automatic, None}]

Out[2]= [image]
```

---

General Fourier coefficients for ``Abs`` :

```wl
In[1]:= FourierCoefficient[Abs[t], t, n]

Out[1]= Piecewise[{{Pi/2, n == 0}}, -((-1 + (-1)^n)^2/(2*n^2*Pi))]
```

---

Fourier coefficient for a basis exponential function:

```wl
In[1]:= FourierCoefficient[E ^ (3 I t), t, n]

Out[1]= DiscreteDelta[-3 + n]

In[2]:= Table[%, {n, -4, 4}]

Out[2]= {0, 0, 0, 0, 0, 0, 0, 1, 0}
```

### Options (2)

#### Assumptions (1)

Specify assumptions on a parameter:

```wl
In[1]:= FourierCoefficient[E ^ (I a t), t, n, Assumptions -> Element[a, Integers]]

Out[1]= DiscreteDelta[-a + n]
```

#### FourierParameters (1)

Use a nondefault setting for ``FourierParameters`` :

```wl
In[1]:= Table[FourierCoefficient[t ^ 3, t, n, FourierParameters  -> ps], {ps, {{1, 1}, {1, -2π}}}]

Out[1]= {(I (-1)^n (-6 + n^2 π^2) Sign[n]^4/n^3), -(I (-1)^n (-6 + n^2 π^2) Sign[n]^4/8 n^3 π^3)}
```

### Properties & Relations (4)

``FourierCoefficient`` is defined by an integral:

```wl
In[1]:= FourierCoefficient[t ^ 2 + t, t, 3]

Out[1]= -(2/9) - (I/3)

In[2]:= 1 / (2π) Integrate[(t ^ 2 + t)E ^ (-3I t), {t, -π, π}]

Out[2]= -(2/9) - (I/3)
```

---

Compute the exponential Fourier series using the individual coefficients:

```wl
In[1]:= FourierSeries[t ^ 2 + t, t, 2]

Out[1]= (-2 + I) E^-I t - (2 + I) E^I t + ((1/2) - (I/2)) E^-2 I t + ((1/2) + (I/2)) E^2 I t + (π^2/3)

In[2]:= Sum[FourierCoefficient[(t ^ 2 + t), t, n] E ^ (I n t), {n, -2, 2}]

Out[2]= (-2 + I) E^-I t - (2 + I) E^I t + ((1/2) - (I/2)) E^-2 I t + ((1/2) + (I/2)) E^2 I t + (π^2/3)
```

---

``FourierCoefficient`` is the same as ``InverseFourierSequenceTransform``:

```wl
In[1]:= FourierCoefficient[Abs[t], t, n]

Out[1]=
\[Piecewise]|                            |       |
| :------------------------- | :---- |
| (π/2)                      | n == 0 |
| -((-1 + (-1)^n)^2/2 n^2 π) | True  |

In[2]:= InverseFourierSequenceTransform[Abs[t], t, n]

Out[2]=
\[Piecewise]|                            |       |
| :------------------------- | :---- |
| (π/2)                      | n == 0 |
| -((-1 + (-1)^n)^2/2 n^2 π) | True  |
```

---

Fourier coefficients for basis exponentials:

```wl
In[1]:= FourierCoefficient[E ^ (-5 I t), t, n]

Out[1]= DiscreteDelta[5 + n]

In[2]:= FourierCoefficient[E ^ (5 I t), t, n]

Out[2]= DiscreteDelta[-5 + n]

In[3]:= FourierCoefficient[1, t, n]

Out[3]= DiscreteDelta[n]
```

## See Also

* [`FourierSeries`](https://reference.wolfram.com/language/ref/FourierSeries.en.md)
* [`FourierSinCoefficient`](https://reference.wolfram.com/language/ref/FourierSinCoefficient.en.md)
* [`Fourier`](https://reference.wolfram.com/language/ref/Fourier.en.md)
* [`FourierTransform`](https://reference.wolfram.com/language/ref/FourierTransform.en.md)
* [`SeriesCoefficient`](https://reference.wolfram.com/language/ref/SeriesCoefficient.en.md)
* [`Integrate`](https://reference.wolfram.com/language/ref/Integrate.en.md)

## Related Guides

* [Fourier Analysis](https://reference.wolfram.com/language/guide/FourierAnalysis.en.md)
* [Integral Transforms](https://reference.wolfram.com/language/guide/IntegralTransforms.en.md)

## History

* [Introduced in 2008 (7.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn70.en.md)