$\int sin2(x)dx\; >\; 0$

The integral of the square of the sine function is always positive. This makes sense sort of by definition, because anything squared is always positive, so the negative parts of the sine curve become positive when squared. To illustrate this graphically, I'll show the integral of the sine function:

followed by the integral of the sine squared:

So the integral of the sine times itself is always greater than 0.

Now, the key: the integral of the sine times a sine with a different frequency over an entire period is always equal to 0. Let's slow down and read that one more time, since it's hard to say in a small number of words. The integral of two sine functions with different periods is always 0. To take a specific example, let the second sine function be sin(3x), or one with 3 times the frequency like the green curve here:

The statement I'm making can be expressed symbolically,

$\int sin(x)*sin(3x)dx\; =\; 0$ (integrated over a full period)

How about graphically? Well, here is a plot of sin(x)*sin(3x), and if you look, the green regions are equal in area to the yellow regions, for a total integral of 0.

How about if I show another example, with a sine of four times the frequency.

$\int sin(x)*sin(4x)dx\; =\; 0$ (integrated over a full period)

Again, the areas of the green and yellow regions are equal, and the total integral is 0. Now I haven't proven this is true for all frequencies, but it can be done rigorously (or rigourously); I suppose you might have to take my word on it, but it clearly works for the two examples given.

There's one more theorem that I need to state before finally explaining Fourier analysis, although I hope it won't be too difficult to understand. This is an associative statement, that the integral of the sum of two functions (any functions, let's just call them f(x) and g(x); for example, they could be sin(x) and sin(3x)) is equal to the sum of the integrals done separately:

$\int \; (f(x)\; +\; g(x)\; )dx\; =\; \int \; f(x)dx\; +\; \int \; g(x)dx$

Let me know if that is not clear, because I'm so excited about the punch line, I'm inclined to skip past some of this stuff.

# Finally...

To recap, so far we know the following things:

1. Any periodic shape can be expressed as the sum of sine functions with different frequencies.

2. The integral of a curve is the area under the curve.

3. The integral of a sine times itself is greater than 0.

4. The integral of a sine times a sine with a different frequency is equal to 0.

5. The integral of a sum of functions is equal to the sum of the integrals done independently.

Who can guess what the next step is?

Suppose I have an unknown function (like the A chord from the November post).

By Rule 1, I know that this function can be expressed as the sum of many sine curves of different frequencies. Now, suppose I want to understand what the signal actually is - I want to break it down into the frequencies that went into its construction.

What if I multiplied the unknown function by a sine curve of a given frequency that I know and integrated the result over an entire period? From Rule 4 above, if the frequency I control does not match one of the frequencies that make up the unknown function, the integral will be 0. But if I do find a match, all of a sudden, the integral is positive (by Rule 3) and I've identified one of the component frequencies in my unknown function!

Now, I scan my known frequency over all frequencies, and at the end of the scan, I've found all of the elements that went into making the unknown signal, producing a plot like this:

In this graph, I'm basically plotting the value I get when I integrate the product of the A chord function times a sine with a frequency given by the value on the x-axis. In most situations, I get 0, but when I find a match, the integral (or "power") is positive and I see a spike!

Isn't this exciting? And I'm being completely serious here, none of the vaguely self-mocking tone you might find elsewhere in this blog - I find Fourier analysis completely awesome and elegant and beautiful. Simply using mathematical formalism, we can completely deconstruct a complicated and unknown signal into its individual constituents and understand exactly what is going on. It's stuff like this that makes me love physics and math. If I didn't quite manage to get the beauty and simplicity across in the last few posts, let me know and I'll do what I can to fix it.