# Simpsons/Trapazoidal rule

1. Feb 27, 2006

### Lewis

I believe the following problem involves using the Simpsons/Trapazoidal rule, and I've tried everything and get nowhere but rediculus integrals. Any help would be greatly appreciated.

For the harmonic oscillator, the kinetic energy is:

<K>=(1/T) Integral[0.5 m(x^2), {t, 0, T}] (I hope that's clear, I typed it as I would in mathematica, sort of)

where x is the position. Now if x(t)=5.0Sin[wt] then determine the average energyover a period of time equal to 5 seconds for differing values of the period y, where w=2pi/y . Calculate the average kinetic energy if the mass is 0.100kg and the period y takes on values of 1,2,3,4 and 5 seconds and then plot the average kinetic energy against period.

So in case the t's are confusing, T=5, and the upper limit on the integral would be 5, the lower 0 and the variable of integration would be t. Thanks very much.

2. Feb 28, 2006

### Astronuc

Staff Emeritus
The integral of sin2 ($\omega$t) should be straightforward. Squaring the function ensures it is positive and nonzero.

3. Feb 28, 2006

### Lewis

Okay, I see now. Thank you.