This question relate to fourier series in electrical engineering but I post it here as it's only mathematical concern.
I cannot prove this $$\frac1T \int_0^T\left(\sum_{k=-\infty}^{\infty}c_ke^{j{\frac{2\pi kt}{T}}}\right)^2dt= \sum_{k=-\infty}^{\infty}|c_k|^2$$ What I did is: $$j{\frac{2\pi kt}{T}}=\theta k\\ \begin{align} &\implies\left(\sum_{k=-\infty}^{\infty}c_ke^{\theta k}\right)^2 \\ &=\left(\sum_{k_1=-\infty}^{\infty}c_ke^{\theta k_1}\right)\left(\sum_{k_2=-\infty}^{\infty}c_ke^{\theta k_2}\right) \end{align}$$ For $e^{\theta k_1}e^{\theta k_2}$
$$\int_0^T{e^{\theta k_1}e^{\theta k_2}}dt = \begin{cases} T & \text{if $k_1=-k_2$}\\ 0 & \text{if $k_1\neq -k_2$} \end{cases}$$ Now I got struck at this point and don't know what to do next. Moreover $$c_k = \frac12(a_k-jb_k)$$ if it is expressed as classic Fourier series
I would take the following approach. Yes, simplify the variables in the integral to get
$$\frac1{2 \pi} \int_0^{2 \pi} d\phi\, \left |\sum_{k=-\infty}^{\infty} c_k e^{i k \phi} \right |^2 $$
Expand the square on the left to be a double sum
$$\frac1{2 \pi} \int_0^{2 \pi} d\phi\, \sum_{k=-\infty}^{\infty} c_k \, \sum_{k'=-\infty}^{\infty} c_{k'}^* \, e^{i (k-k') \phi}$$
Change order of summation and integration:
$$\sum_{k=-\infty}^{\infty} c_k \, \sum_{k'=-\infty}^{\infty} c_{k'}^* \frac1{2 \pi} \int_0^{2 \pi} d\phi\, e^{i (k-k') \phi}$$
The integral is $2 \pi \, \delta_{kk'}$, where $\delta$ is the Kroneker delta with the sifting property. Thus, only the diagonal terms of the double sum survive, and the equation is proven.