Start with a simple example, where the bulb is part of a flashlight with two C batteries. The voltage is constant at 2×1.5 = 3 volts. A typical flashlight bulb has a resistance of 4.5 ohms. The power delivered is thus 32 / 4.5, or 2 watts. (Each battery delivers 1 watt, somewhat less than its maximum rating of 1.8 watts.)
As you recall, energy is power times time. Let the flashlight shine for an hour, and the energy consumed is 2 watt hours. Leave the light on for 2 hours and consume 4 watt hours, and so on. However, after 1.8 hours, your batteries will probably be dead. Oh well - it's all in the name of science.
Things are different when the voltage is not constant. Return to our lamp, which is plugged into the wall. Houses carry alternating current, in the form of a sine wave. The voltage goes up to a maximum value, down to 0, then reverses polarity, going "down" to minus the maximum value, then back up to 0. This sine wave is a result of the spinning magnet in the generator as it sweeps through the wires. The magnet turns 60 times a second, creating 60 cycles per second of electricity. In other words, each second contains 60 sine waves. (Power in Europe is 50 cycles per second.)
If this power is connected directly to a speaker, with no intervening electronics, you will hear a 60 hz tone. This is the low hum that we associate with electronics in general. It can sometimes be heard emanating from high power transformers. Much of your stereo is devoted to smoothing out the electricity, so that the hum goes away, and all you hear is music. But that's another story - let's get back to the lamp.
At the top of the sine wave, the bulb is converting voltage to power at a peak rate. The filament is hot and bright. The same thing occurs at the bottom of the sine wave. At the two points in between, when the voltage is 0, the bulb receives no power from the wall. It may still shine, because the filament is still hot, but it is much dimmer. Therefore, the bulb actually flashes 120 times per second. This is faster than a computer monitor, or a tv screen, and certainly faster than your eye can see, so it looks like a continuous light source. However, if you hook up a photoresistor to a speaker, and let the light fall onto the photoresistor, you will hear the hum in the speaker. Replace the household lamp with a flashlight, or the sun, and the hum disappears. (I did this experiment as a child; it really works.)
If the resistance of a typical light bulb is 200 ohms, how can we calculate the power drawn from the electrical circuit, or the energy consumed in an hour? After all, the voltage is changing all the time?
Riemann is going to come to our rescue. If the voltage were a step function, perhaps an upper sum or a lower sum, the energy consumed would be the riemann sum of v2/r, where v is a step function of time. In other words, energy is computed for each slice of time where the voltage is constant, then these little energies are added together to get the total energy consumed. Take the limit, and the energy of the circuit is the integral, as time runs from a to b, of v(t)2/r. For convenience, let time run through one cycle. Since the cycle repeats, the same energy is consumed during each cycle - so it is enough to compute energy for one cycle. Furthermore, the overall power is the energy of one cycle divided by its period. This is the integral of v2/r, across one cycle, divided by the length of that cycle. Since r is a constant, it is sometimes pulled out of the equation. Power is inversely related to r, and we can always substitute different values of r later. Setting r = 1, the power of the voltage source is the average of v2, or the root mean square.
rms = ∫ v2 over period
If time is measured in some other units, other than seconds, the integral is scaled by some conversion factor c, and the period is also multiplied by c. The rms doesn't change. Therefore rms is a dimensionless value that depends only on the shape of the wave form, i.e. the graph of one cycle of v(t).
Since the units don't matter, let time run from 0 to 2π, whence v(t) is k×sin(t). The integral of sin2(t), from 0 to 2π, is π. Divide this by 2π and get ½. Therefore the rms of k×sin(t) is ½k2.
When the AC voltage in your house is rated at 110, that's 110 rms. The lamp would pull the same power if the electricity were constant at 110 volts. Set ½k2 = 1102, and k is 110 times the square root of 2, or 156. The voltage in your home actually rises to 156 volts, drops through 0 and down to -156 volts, then returns to 0. And it does this 60 times a second. The power is the same as a 110 DC voltage source. In either case, your 200 ohm bulb pulls 1102/200 = 60 watts of power, and is labeled a "60 watt" bulb. (Measuring light by the power consumed is somewhat obsolete, since new bulbs deliver the same amount of light for as little as 13 watts.)
The power consumed is proportional to the voltage squared. So the first city is pulling power at a rate of sin(t) squared, sometimes written sin(t)2. All three cities consume power at the following rate:
sin(t)2 + sin(t-120°)2 + sin(t-240°)2
Simplify this expression - the answer may surprise you.
Apply the angle addition formula. Sin(t-120°) is -½ (sin(t) + sqrt(3)×cos(t)). To simplify notation, let x be the first term and y the second, giving -½ (x+y). Now sin(t-240°) expands into a similar expression, -½ (x-y) to be exact. We have to square these expressions and add them together, giving ¼×2×(x2+y2). Substitute for x and y to obtain ½ + cos(t)2. Bring in sin(t)2 and the result is ½+1.
The power extracted from the generator is constant, perfectly balanced between the three cities. If it weren't, the time varying megawatts of power would literally shake the generator to pieces. This is surely the most useful trig identity of them all.
If you run a large factory, the power company may ask you to employ 3 phase current, as though you lived in all three cities at once. As you draw current to run your machinery, or melt your iron into steel, the generator will not become unbalanced, because you are pulling power from all three phases at once.
When a wave form is expressed as a sum of fourier components, the resulting sine waves and cosine waves are orthogonal. Therefore the power of a wave is a02 plus half the sum of the squares of the remaining fourier coefficients. (Usually there is no DC component in an AC circuit, whence a0 = 0.)
I'm sure you noticed that I jumped from the finite case to the infinite series without using the letters δ or ε at all. If the fourier series converges to w uniformly, which it almost always does, the square of the sum of the first n fourier components converges uniformly to w2, and the power of the partial sum approaches the power of w, and the squares of the fourier coefficients form an absolutely convergent series, and you know what, I think I'll leave the details to you. (If you're an engineer you only care about the first few terms anyways.)
Computing the fourier coefficients seems a lot harder than finding the rms directly, through integration, but sometimes we neeed the forier series for other reasons, and in that case, we may as well use the coefficients to determine power.
The waves of an earthquake are subject to the same mathematics. The power is the rms, which is half the sum of the squares of the fourier coefficients. Physics majors can come up with many more examples I'm sure.