# Average value of a function and simple harmonic motion

## Homework Statement

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)

## 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...

## Answers and Replies

HallsofIvy
Science Advisor
Homework Helper
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.

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:
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.

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.

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:
dynamicsolo
Homework Helper
How is this meaningful in terms of the integrals I provided? Why aren't these integrals OK in terms of <E>space = <E>time?

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) .

However, for your second set,

$$<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.

Thanks for this explanation