
Here, I am going to prove the orthogonality principle of sin and cos functions. First off, let's have some definitions:
So, the function I'm trying to prove is:

is zero if:
i) f(t) = cos nωt, g (t) = cos mωt, n ≠ m

Since n and m are integral, each term on the RHS is integrated over an integral number of cycles. The integral of a cos function over a complete cycle is, of course, zero, so the expression must be zero.
ii) f(t) = sin nωt, g(t) = sin mωt, n ≠ m

Using a similar argument to that above, it is obvious that this will also be zero.
iii) f (t) = cos nωt, g (t) = sin mωt

If n ≠ m, the above arguments apply. If n = m, the first term will be zero and the second will be integrated over an integral number of cycles, so the result will still be zero.
Now, for (i) above, for n = m, this yields:

since 2n is integral. The same is obtained for (ii). Therefore, for integral n and m:

This result is called the orthogonality property of trig functions. It's important because by multiplying a periodic function by cos nωt, then integrating between the limits, we can get the component of the function with respect to cos nωt: the coefficient of cos nωt in the function's Fourier series. Similarly with sin, and so this gives us a method by which we can find the Fourier coefficients of a function.