Showing that complex exponentials of the Fourier Series are an orthonormal basis
I am revisiting the Fourier transform and I found great lecture notes by Professor Osgood from Standford (pdf ~30MB).
On page 30 and 31 he show that the complex exponentials form an orthonormal basis. I understand the result, but not his calculation. He shows that the inner product of two different exponentials $(e_n (t) = e^{2\pi int}, e_m(t)= e^{2\pi imt})$ with $m \neq n$ is $0$ (He uses round parenthesis to denote the inner product). So, he does the calculation:
$$ (e_n, e_m) = \int_0^1 e^{2\pi int} \overline{e^{2\pi imt}}dt = \dots = \frac{1}{2\pi i(n -m)} (e^{2\pi i(n - m)} - e^0) = \frac{1}{2\pi i(n -m)} (1 - 1) = 0$$
So why is $e^{2\pi i(n - m)} = 1$? And why do I have to look at the case $ m = n$ separately and cannot also just plug it into the last step? (I am aware that I would not get a sensible result then, but it still seems strange). Does this have anything to do because I am using Lebesgue integration and complex numbers? I suppose I have to review some math basics ...
If $l=n-m\neq 0$ you have
$$e^{2\pi i(n-m)}=e^{2\pi i l}=\cos(2\pi l)+i\sin(2\pi l)=1+i\cdot 0=1$$
The case $m=n$ has to be considered separately because in the solution you showed you divide by $m-n$, which you can't do if $m-n=0$. For $m=n$ you simply get
$$\int_0^1e^{2\pi i nt}e^{-2\pi i nt}dt=\int_0^1dt=1$$