# 1D Oscillator
Consider a classical harmonic oscillator where the [solution to the equation of motion](1D%20Harmonic%20Oscillator.md#Solution) is $q(t)=q_1\cos(\omega t)$ given some starting position $q_1$. If we want to find the average position of this oscillator over a half interval (where the oscillator ranges from the equilibrium position to the maximum position), the average is an [average over time](Average%20position%20over%20time.md), where the interval is from $0$ to $T=\pi/\omega,$ thus we integrate to find
$\langle q(t) \rangle = \frac{1}{\pi/\omega}\int_0^{\pi/\omega}dt\,\delta(q-q_1\cos(\omega t))$
where in order to access the argument of the [$\delta$ function](Dirac%20delta%20function.md) we change the integration variable to $y=q_1\cos(\omega t)$ so that
$\langle q(t) \rangle = \frac{1}{\pi/\omega}\int_{q_1}^{-q_1}\frac{\delta(x-y)}{q_1 \omega \sin{(\omega t)}}=\frac{1}{\pi}\int_{q_1}^{-q_1}\frac{\delta(q-y)}{q_1 \sqrt{1-\cos^2{\omega t}}}$
where we used [trigonometric identity](Analysis%20(index)#Trigonometric%20Functions%20and%20Identities) relating $\sin^2{\omega t}$ to $\cos^2{\omega t}$ in order to simplify further to
$\langle q(t) \rangle=\frac{1}{\pi} \int_{q_1}^{-q_1}\frac{\delta(q-y)}{ \sqrt{q_1^2-y^2}} = \frac{1}{\pi \sqrt{q_1^2-q^2}}$
where if we plot the real part of $\langle q(t) \rangle$ is plotted as follows, giving the time-averaged position.

## Correspondence with the Quantum Harmonic oscillator
---
# Recommended reading
The [average position of a 1D oscillator](Average%20position%20over%20time%20of%20a%20Harmonic%20Oscillator.md#1D%20Oscillator)
* [Franklin, J., _Harmonic Oscillator Physics_, Lecture 9, Physics 342, Quantum Mechanics 1, Lecture Notes, Spring 2010](Franklin,%20J.,%20Harmonic%20Oscillator%20Physics,%20Lecture%209,%20Physics%20342,%20Quantum%20Mechanics%201,%20Lecture%20Notes,%20Spring%202010.md) pg. 6. Here the classical harmonic oscillator is approached as if it were a quantum oscillator and a comparison of results between the two is made.
#Mechanics
#Mechanics/WaveMechanics
#PhysicalExamples/PhysicalExamplesInMechanics