In this section we will show the other way around: when we are given the waveform in the time-domain of a periodic signal $x(t)$, how can we derive the spectral weights $\alpha_k$? In order to do so we need the following basic property of a phasor function:
Mathematically this can be shown as follows: $$ \int_0^{T_0} e^{j2\pi k F_0 t} \mathrm{d}t = \left[\frac{e^{j2\pi kF_0 t}}{j2\pi F_0 k}\right]_{t=0}^{T_0} = \frac{e^{j2\pi k}-1}{j2\pi F_0 k} = \frac{1-1}{j2\pi F_0 k} = 0. $$ Furthermore the integral can be evaluated for $k=0$ as $$ \int_0^{T_0} e^{j2\pi 0 F_0 t}\mathrm{d}t = \int_0^{T_0}1\mathrm{d}t = \left[t\right]_0^{T_0} = T_0-0 = T_0. $$ What do the above two equation now actually mean? If we integrate a sinusoidal signal over a number of periods, we are actually summing the areas under the sinusoid. Since the sinusoid has an equal area under as above the horizontal axis per period, the area will sum to zero. However, if $k=0$, which means that we are talking about a DC signal, the signal does not oscillate around the horizontal axis and therefore the integral will not become zero.
When we normalize and combine the previous two equations we obtain the basic property of phasors
$$\bbox[5px,border:1px solid black]{ \frac{1}{T_0}\int_0^{T_0}e^{j2\pi kF_0 t}\mathrm{d}t = \begin{cases} 1, &\text{for }k=0\newline 0. &\text{for }k\neq 0 \end{cases}} $$
Since we are sure that a periodic signal $x(t)$, with Fundamental period $T_0 = 1/F_0$, only consists of harmonic related frequencies we can use the above phasor property as follows to analyze which harmonic related frequencies are present in $x(t)$ and what are the complex values of the spectral weights. For this we evaluate the normalized integral over one period $T_0$ of $x(t)$ multiplied by a phasor with harmonic related frequency $l \cdot F_0$. Thus with both $k$ and $l$ integer we obtain
$$ \begin{split} \frac{1}{T_0}\int_0^{T_0}x(t)e^{-j2\pi lF_0 t}\mathrm{d}t &= \frac{1}{T_0}\int_0^{T_0}\left(\sum_{k=-\infty}^{\infty} \alpha_k e^{j2\pi kF_0 t}\right)e^{-j2\pi lF_0 t}\mathrm{d}t, \newline &= \sum_{k=-\infty}^{\infty} \alpha_k \left(\frac{1}{T_0} \int_0^{T_0} e^{j2\pi(k-l)F_0 t}\mathrm{d}t \right), &= \alpha_l. \end{split} $$
In the last step we have used the phasor property to observe that the integral only becomes non-zero when $k=l$.
Thus when we are given a periodic signal $x(t)$ with period $T_0 = 1/F_0$ then we can find the spectral components $a_k$ by using the following Fourier series analysis equation $$\bbox[5px,border:1px solid black]{ \alpha_k = \frac{1}{T_0}\int_0^{T_0}x(t)e^{-j2\pi kF_0t}\mathrm{d}t}. $$
In practical application it is impossible to evaluate $\alpha_k$ for $-\infty<k<\infty$. Therefore we can approximate a period signal $x(t)$ with only a limited amount of terms as
$$ \hat{x}(t) = \sum_{k=-N}^{N} \alpha_k e^{j2\pi kF_0 t}. $$ It is obvious that the approximation becomes better and better for larger $N$.