LEARNING EXAMPLE
Compute the rms value of the voltage waveform and use it to
determine the average power supplied to the resistor