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!