Normalization constant in Fourier series At this point on Professor Strang's lecture on Fourier series online, and after deriving the coefficients of the expression of a function $f(x)$ as an infinity sum of cosine harmonic functions:
$$a_k = \color{red}{\frac{1}{\pi}}\int_{-\pi}^\pi f(x) \cos kx dx$$ 
resulting from
$$\int_{-\pi}^\pi  \cos^2 kx dx = \pi$$
he mentions that if, instead of cosines, we were working with complex coefficients, the formula would be identical, but with 
$$\frac{1}{2\pi}$$
in front:
$$c_k = \color{red}{\frac{1}{2\pi}}\int_{-\pi}^\pi f(x) e^{-ikx} dx$$ 
How is this term calculated? I presume there is some immediate way of seeing it based on complex symmetry, but I couldn't find the formal derivation.
I see how in the case of the "DC" term $a_o,$ the normalization factor is also $\frac{1}{2\pi}:$
$$\begin{align}
\int_{-\pi}^{\pi}f(x)\cos x \mathrm dx &=\int_{-\pi}^{\pi}a_0 \left( \cos x\right)^2\mathrm dx\\
&=a_o\int_{-\pi}^{\pi}\cos^2 x \mathrm dx
&=a_0 2\pi
\end{align}$$
 A: Euler formula:
\begin{align*}
\sin(x) = \frac {\mathrm e^{\mathrm ix} - \mathrm e^{-\mathrm ix}} {2\mathrm i}, \\
\cos(x) = \frac {\mathrm e^{\mathrm ix} + \mathrm e^{-\mathrm ix}} {2}.
\end{align*}
Explicitly, collect $\cos(nx)$ terms we have 
$$
a_n = c_n + c_{-n}, \tag{1}
$$
collect $\sin(nx)$ terms we have
$$
b_n =\mathrm i (c_n - c_{-n}), \tag{2}
$$
then by $(1)-\mathrm i(2)$, we have
$$
c_n = \frac 12 (a_n - \mathrm i b_n) = \frac 1{2\pi} \int_{-\pi}^\pi f(x)(\cos(nx) - \mathrm i\sin(nx))\mathrm dx = \color{\red}{\frac 1{2\pi}} \int_{-\pi}^\pi f(x) \mathrm e^{-\mathrm inx} \mathrm dx,
$$
similarly for $c_{-n}$. Hence the coefficient. 
A: Write formally 
$$
f(x) = \frac{a_0}{2}+\sum_{k=1}^\infty a_k\cos (kx).
$$
By orthogonality of the sequence $\{\cos(kx)\}_{k=0}^\infty$, one has (for $k>0$)
$$
\int_{-\pi}^\pi f(x)\cos (kx)\ dx= \int_{-\pi}^\pi a_k \cos^2 (kx)\ dx 
= a_k\int_{-\pi}^\pi \cos^2(kx)\ dx = a_k\cdot \pi,
$$
which gives you the constant $\pi$.
Similarly, if 
$$
g(x) = \sum_{k=-\infty}^\infty a_ke^{-ikx},
$$
then by orthogonality of $\{e^{-ikx}: k\in\mathbf{Z}\}$, one has
$$
\int_{-\pi}^\pi g(x)e^{-ikx}\ dx = a_k\int_{-\pi}^{\pi}|e^{-ik\pi}|^2\ dx = a_k\cdot (2\pi)
$$
which gives you the constant $2\pi$.
