In the derivation (image below) of getting the Fourier series coefficients, $e^{-jlw_0}t$ is integrated with $x(t)$ over a $[t_0,t_0+T]$ interval to isolate the $a_k$th coefficient.
But why the need to integrate at all? Why can't we replace the integration with just the difference of the product at the two endpoints $$ (x(t) e^{-jlw_0t}) \Big|_{t_0}^{t_0+T} = \sum_{k=-\infty}^\infty a_k e^{-jkw_0t} e^{-jlw_0t}\Big|_{t_0}^{t_0+T} $$
For $k\neq l$, $e^{jkw_0t} e^{-jlw_0t} \Big|_{t_0}^{t_0+T}= e^{j(k-l)w_0t} \Big|_{t_0}^{t_0+T}= 0 $ because it's a harmonic of $w_0$ and thus equal at $t_0$ and $t_0+T$
And for $k=l$, $e^{jkw_0t} e^{-jlw_0t} \Big|_{t_0}^{t_0+T} = 1$. So,
$\sum_{k=-\infty}^\infty a_k e^{-jkw_0t} e^{-jlw_0t}\Big|_{t_0}^{t_0+T} = a_l$
What am I missing here?
