Why do we write the first term of the Fourier cosine series as $c_{0}/2$ instead of simply $c_0$?

769 Views Asked by At

The Fourier cosine series of some function $f(x)$ defined over the interval $[0, L]$is written as:

$$f(x) = \sum_{k = 0}^{\infty} c_k\cos(\frac{k\pi}{L} x)$$

Where $c_k$ can be determined by the orthogonality of cosine functions:

$$ \int_{0}^{L} c_k\cos^2(k\pi x)\;\textrm{d}x = \int_{0}^{L} f(x)\cos(\frac{k\pi}{L} x)\;\textrm{d}x$$

$$ c_k (L/2) = \int_{0}^{L} f(x)\cos(\frac{k\pi}{L} x)\;\textrm{d}x$$

$$ c_k = (2/L)\int_{0}^{L} f(x)\cos(\frac{k\pi}{L} x)\;\textrm{d}x$$

If $k=0$ we have (ERROR HERE -- SEE EDIT AND ANSWER):

$$ c_0 = (2/L)\int_{0}^{L} f(x)\;\textrm{d}x$$

However, I often see the Fourier cosine being written as:

$$f(x) = c_0/2 + \sum_{k = 1}^{\infty} c_k\cos(\frac{k\pi}{L} x)$$

Why is it not written as:

$$f(x) = c_0/2 + \sum_{k = 1}^{\infty} c_k\cos(\frac{k\pi}{L} x)$$

Isn't it incorrect to write it with $c_0/2$?


Here's what the answer to my question reminded me of:

$$ \int_{0}^{L} c_0\cos(0)\;\textrm{d}x = \int_{0}^{L} c_0\;\textrm{d}x = c_0L \neq c_0(L/2)$$

Always take care of the devil in the details!

1

There are 1 best solutions below

0
On BEST ANSWER

The term that must be added is $\frac{1}{L} \int_a^b f(x) dx$, because when $k=0$ you get $c_0 L$, not $c_0 L/2$, on the left side. Another way of thinking about it is that you need $\frac{1}{L} \int_a^b f(x) dx$ in order for the cosine series to have the same integral as the original function, since the cosine terms contribute nothing to the integral.

So there's some irregularity built in to the situation. The usual choice is to put the irregularity in the formula for the series, instead of putting it in the formulae for the coefficients. This means you define $c_0$ with $\frac{2}{L}$, just like the other $c_k$, and then divide out the extra factor of $2$ in the formula for the series.