# Average value of a function

1. May 28, 2008

### cscott

1. The problem statement, all variables and given/known data

For simple harmonic motion calculate the average value of KE and PE in space and time using

$$\frac{1}{t_2-t_1}\int^{t_2}_{t_1}{f(t)dt$$ (and the similar version for space)

3. The attempt at a solution

For time I get <KE> = 1/4 kA^2, <PE> = 1/4 kA^2 which makes sense but for space I get <KE> = 1/3 kA^2, <PE> = 1/6 kA^2

The above seems right for time not but space. Shouldn't the average values all be the same since either in space or time the same range of energies is taken by KE and PE.

However for both space and time <E> = <KE> + <PE> = 1/2 kA^2...

2. May 28, 2008

### HallsofIvy

Staff Emeritus
Perhaps if you showed your work we could tell you whether it is right or wrong. I can see no reason for all the average values to be the same.

3. May 28, 2008

### cscott

Can you explain why my logic is wrong as to why <KE> and <PE> should be different when calculated within space and time?

$$<KE>time = \frac{1}{T} \int_0^T \frac{1}{2} k A^2 \cos^2(\omega t) dt = \frac{1}{4}kA^2$$

$$<PE>time = \frac{1}{T} \int_0^T \frac{1}{2} k A^2 \sin^2(\omega t) dt = \frac{1}{4}kA^2$$

$$<KE>space = \frac{1}{A} \int_0^A \left[ \frac{1}{2}kA^2 - \frac{1}{2}kx^2 \right] dx = \frac{1}{3} kA^2$$

$$<PE>space = \frac{1}{A} \int_0^A \frac{1}{2} kx^2 dx = \frac{1}{6} kA^2$$

T = period, A = amplitude

Last edited: May 28, 2008
4. May 28, 2008

### DavidWhitbeck

Well averaging in space is like averaging in time if you introduced a weight factor-- namely the speed.

If you do a weighted average of energy with speed, KE will come up higher than PE because KE is big when the speed is big, and PE is big when the speed is small.

In essence if you weight your function with a factor that is in phase with the factor you can get a bigger result. If you weight your function with a factor that is out of phase you get a smaller result.

5. May 28, 2008

### cscott

How is this meaningful in terms of the integrals I provided? Why aren't these integrals OK in terms of <E>space = <E>time?

Last edited: May 28, 2008
6. May 29, 2008

### dynamicsolo

There is no reason the expectation values of the kinetic energy and potential energy averaged over time should be the same as those averaged over space. In your first set,

$$<KE>_{time} = \frac{1}{T} \int_0^T \frac{1}{2} k A^2 \cos^2(\omega t) dt = \frac{1}{4}kA^2$$

$$<PE>_{time} = \frac{1}{T} \int_0^T \frac{1}{2} k A^2 \sin^2(\omega t) dt = \frac{1}{4}kA^2$$ ,

time is a "uniform" variable, so every infinitesimal interval is "weighted" the same. You find that $$<KE>_{time} = <PE>_{time}$$, in accord with the virial theorem for a potential of the form U = k·(x^2) .

$$<KE>_{space} = \frac{1}{A} \int_0^A \left[ \frac{1}{2}kA^2 - \frac{1}{2}kx^2 \right] dx = \frac{1}{3} kA^2$$

$$<PE>_{space} = \frac{1}{A} \int_0^A \frac{1}{2} kx^2 dx = \frac{1}{6} kA^2$$ ,

the displacement from equilibrium is not uniform, in that the simple harmonic oscillator (mass on a spring, pendulum bob, or what-have-you) spends disproportionately more time far from equilibrium than close to it. So the spatial average for potential energy receives most of its contribution from the relatively small sections of the oscillation where PE is greatest, while most of the contribution to the spatial average for kinetic energy comes from a fairly broad region around the equilibrium point.

After all, if you use x = A sin(wt) for the displacement from equilibrium, then you have the differential dx = Aw cos(wt) dt , which gives most of the "weight" in the spatial average to the two-thirds of the cycle around the equilibrium point.

The important thing here is that you found the same expected value for total mechanical energy over the entire cycle, whether temporally- or spatially-averaged.

7. May 30, 2008

### cscott

Thanks for this explanation