Integration with a change of basis turns the result negative

33 Views Asked by At

I am calculating the average kinetic energy of a simple harmonic oscillator via

$$\frac{1}{2A}\int_{-A}^A \frac{m}{2}\dot{x}^2dx = \frac{m}{4A}\int_{\text{half period}}\dot{x}^2 \left(\frac{dx}{dt}\right) dt= \frac{m}{4A}\int_{\text{half period}}\dot{x}^3 dt$$

However, now when I carry the integration through, I get a negative value instead of the expected positive quantity. Otherwise, the value appears to be correct. Can anyone offer insight as to what I missed? Was the quantity $\frac{dx}{dt}$ supposed to be $\|{\frac{dx}{dt}}\|$?