Proving orthogonality
Sinusoids are power signals, and in the case of power signals, cross-correlation between two signals $x(t)$ and $y(t)$ is defined by

$$R_{xy}(t)=\lim_{T\rightarrow\infty}\frac{1}{2T}\int_{-T}^{T}x(\tau)y(t+\tau)d\tau\tag{1}$$

If $x(t)=\cos(\omega_1 t)$ and $y(t)=\cos(\omega_2 t)$ then for $\omega_1\neq\omega_2$ the cross-correlation at $t=0$ is

$$\begin{align}R_{xy}(0)&amp;=\lim_{T\rightarrow\infty}\frac{1}{2T}\int_{-T}^{T}\cos(\omega_1 t)\cos(\omega_2 t)dt\\
&amp;=\lim_{T\rightarrow\infty}\frac{1}{2T}\left[\frac{\sin((\omega_1-\omega_2)T)}{\omega_1-\omega_2}+\frac{\sin((\omega_1+\omega_2)T)}{\omega_1+\omega_2}\right]\\&amp;=0
\end{align}$$

Note that the definition (1) avoids all convergence problems that you would encounter otherwise.