# Basic Fourier Series Not Understanding how to interpret n values [closed]

I have a question regarding $n$ in the Fourier series. If a question states "find the Fourier series for (any function) and find the values of an $b_n$ etc", say I'm finding it from the trig way when $n<=4$. What $n$ values do I use, is it 1,2,3,4 and if so why does it start at 1 and not include 0. Also why doesn't the $n$ values keep going past negative so e.g 4 3 2 1 0 -1 .... What makes it start at 1 for this value of n.

Is it since in the formula n=1,2,3.....?

However if it stated for $-3<=N<=3$, would the n values be -3 -2 -1 0 1 2 3? if so why? Also would the zero be in it or not? My $n$ values were less than 0 would you then have to use the complex way?

## closed as unclear what you're asking by hotpaw2, lennon310, MBaz, jojek♦Apr 4 '17 at 14:28

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

There are three different and equivalent ways to express the Fourier series of a real and periodic $x(t)$ where the period is $P$:

\begin{align} x(t) &= x(t+P) \qquad \qquad \forall \ -\infty<t<\infty \\ \\ x(t) &= \qquad \sum\limits_{n=-\infty}^{\infty} c_n \, e^{j n \frac{2\pi}{P} t} \\ \\ &= c_0 + \sum\limits_{n=1}^{\infty} a_n \cos\left(n \tfrac{2\pi}{P} t\right) \ - \ b_n \sin\left(n \tfrac{2\pi}{P} t\right) \\ \\ &= c_0 + \sum\limits_{n=1}^{\infty} r_n \cos\left(n \tfrac{2\pi}{P} t \, + \, \phi_n\right) \\ \end{align}

where the coefficients of the three forms are

\begin{align} c_{-n} &= c_n^* \qquad \qquad \text{( }\cdot^* = \text{complex conjugate)} \\ \\ c_n &= \begin{cases} \tfrac12(a_n + j b_n) &= \tfrac12 \, r_n \, e^{j \phi_n} \qquad & n>0 \\ \tfrac12(a_{-n} - j b_{-n}) &= \tfrac12 \, r_{-n} \, e^{-j \phi_{-n}} \qquad & n<0 \\ \end{cases} \\ \\ a_n &= r_n \cos(\phi_n) = 2 \, \Re\{ c_n \} & n \ge 1 \\ b_n &= r_n \sin(\phi_n) = 2 \, \Im\{ c_n \} & n \ge 1 \\ \\ r_n &= \sqrt{a_n^2 + b_n^2} = 2|c_n| \\ \phi_n &= \arg\{a_n + j b_n\} = \arg\{c_n\} \\ &= \operatorname{atan2}(b_n,a_n) \\ \end{align}

and the $c_n$ coefficients are related to $x(t)$ as

$$c_n = \frac1P \int\limits_{t_0}^{t_0+P} x(t) \, e^{-j n \frac{2\pi}{P} t} \ dt$$

from that you can derive similar integrals for $a_n$ and $b_n$ or for $r_n$ and $\phi_n$.

note that for $c_n$, the index runs as all integers ($-\infty < n < +\infty$). in this sense, it makes sense to talk of "negative frequencies" or "negative frequency components".

but for $a_n$, $b_n$, $r_n$, or $\phi_n$ the index runs for only the positive integers ($1 < n < +\infty$) and one extra term for DC ($c_0$). in this sense there are only "non-negative frequencies" or "non-negative frequency components".

these conventions or forms are the fundamental mathematical reasons behind the different indexing ranges of the coefficients.

I'm assuming the "n" you are referring to is the coefficient index, also referred to as the harmonic number; i.e. the n=3 term refers to the "third harmonic".

The n=0 term is the average value of the function, and is sometimes called the "DC component" because it does not depend on time.

Depending on the version of the Fourier series you are using, the terms in the series could go from negative infinity to positive infinity, or they could just go from n = 0 to positive infinity. The trigonometric version of the Fourier series (with sine and cosine) starts at n=0 and goes to infinity, whereas the complex exponential version (i.e. $c_n e^{j\omega_0 n t}$) has terms for negative and positive values of n.

The two versions are equivalent because the negative n terms cancel out the imaginary parts of the positive n terms in the complex exponential series.

• Ah ok yes thankyou, so I do include the 0 for both?, Unless it's undefined then I find the value for it correct?.Also so for the -3 to n to 3 if I wanted to use the trigger way I would use n greater than 0 to 3 and this would give me the same values as if I did -3 to n to 3 for the complex way? – I have no clue Apr 3 '17 at 23:23
• There is an n=0 term for both cases, and the formula is the same. Its just the average value of the function over one period. – Robert L. Apr 3 '17 at 23:24
• Oh ok so for the trig way the 0 is a0, so b0 is not required to find? – I have no clue Apr 3 '17 at 23:28
• Also sorry but for when it is -3 to n to 3 for the trigger way do I only use values from 0-3, and. For the complex way I use -3 to n to 3? – I have no clue Apr 3 '17 at 23:30
• It sounds like it yes, if your goal is to include all the harmonics up to the 3rd harmonic. – Robert L. Apr 3 '17 at 23:34