So I need to prove the following
$\int_{-L}^{L}|f(x)|^2dx=2L\sum_{n=-\infty}^{\infty}|c_n|^2$
I started with the complex version of the Fourier series
$(1)\;f(x)=\sum_{n=-\infty}^{\infty}c_ne^{in\pi x/L};\quad (2) \;c_n=\frac{1}{2L}\int_{-L}^{L}f(x)e^{-in\pi x/L}dx$
and simply multiplied (1) by $f(x)$ and integrated from -L to L to get
$\int_{-L}^{L}f(x)^2dx=2L\sum_{n=-\infty}^{\infty}c^2_n$
Since anything squared is positive, is it safe to assume that
$\int_{-L}^{L}|f(x)|^2dx=2L\sum_{n=-\infty}^{\infty}|c_n|^2$ ?
Note: I just need to derive the complex form of Parseval's Inequality.
Note that since $(-1)^2 = 1$, it is the case that for any real $x$, $x^2 = |x|^2$.
However, in the complex numbers, the absolute value function does more than just flipping the sign: it also comprises a rotation. $e^{\frac{i \pi}{4}}$ squares to $i$ which is definitely not real, whereas $|e^{\frac{i \pi}{4}}|$ is real and it squares to $1$; so $z^2 = |z|^2$ need not hold for $z$ complex.