The motion for a harmonic oscillator is derived using Newton's second law. Different parametrizations of the solution, the velocity, acceleration and energy are also determined.

In 1-D, what is the simplest mathematical form a force on an object can take? Well, ok, \(F=0\), but that's trivial — there is no force, and the object will move at a constant velocity. The next simplest would be \(F=k\) where \(k\) is a constant. In this case Newton's second law would read \(m a = k\), in other words such a force would produce motion under constant acceleration and it would lead to the kinematic equations.

Arguably the next simplest form would be write \(F = k x\) where \(k\) is a positive constant. Now, if the object moves a little in the positive \(x\) direction the force with push it increasingly hard in that direction and the object will fly off to \(+\infty\) with its acceleration increasing linearly with distance from the origin. The same holds if the object moves a little in the negative direction. Now the force becomes increasingly strong and negative so the object flies off to \(-\infty\). Still rather boring behaviour as objects go.

However if the constant is *negative*, or alternatively if the force has the form
\begin{equation}
F = -k x
\end{equation}
for a positive \(k\), then something new happens. Motion away from the origin in either direction produces a force *back* to the origin. Now Newton's second law reads
\begin{equation}
F = m a = - k x.
\end{equation}
The acceleration is of course \(a = d^2 x/dt^2\), which we'll write as \(a = \ddot{x}\) for compactness, and so we can write down the equation of motion for the object:
\begin{equation}\label{eq:eqmotion}
\ddot{x} + \omega_0^2\; x = 0,
\end{equation}
where \(\omega_0 = \sqrt{k/m}\).

Example:

A great example to have in mind is a mass on a spring. If we extend or compress the spring by a distance \(x\) from its equilibrium position then by Hooke's law the spring will exhert a force \(F_s = -k x\), where \(k\) is the spring constant.

A great example to have in mind is a mass on a spring. If we extend or compress the spring by a distance \(x\) from its equilibrium position then by Hooke's law the spring will exhert a force \(F_s = -k x\), where \(k\) is the spring constant.

This is exactly in the form that we have been considering and the equation of motion from considering Newton's second law will be
\begin{equation}
m \ddot{x} + k x = 0.
\end{equation}

Equation \eqref{eq:eqmotion} is an example of a *second order linear homogeneous differential equation* and we are in luck because we can write a closed solution for such an equation. The general solution to such an equation is
\begin{equation}
x(t) = A \cos(\omega_0 t + \phi_1),
\end{equation}
where \(A\) and \(\phi_1\) are constants that are determined by the initial conditions. The object will oscillate harmonically with an angular frequency of \(\omega_0\).

There are a number of equivalent ways of writing this solution:

- \(x(t) = A \cos(\omega_0 t + \phi_1)\),
- \(x(t) = B \sin(\omega_0 t + \phi_2)\),
- \(x(t) = C \cos(\omega_0 t) + D \sin(\omega_0 t)\),
- \(x(t) = E e^{i \omega_0 t} + E^* e^{-i \omega_0 t}\), for \(E\) complex where \(^*\equiv\) complex conjugation.

Click figure to download the CDF demo.

Since we have \(x(t)\) we can just differentiate once to get the velocity and twice to get the acceleration. Notice that the solutions are all cosines of the same frequency, only the amplitude and phase changes: \begin{align} x(t) &= A \cos(\omega_0 t + \phi_1) & \\ v(t) &= \dot{x}(t) = -\omega_0 A \sin(\omega_0 t + \phi_1) = \omega_0 A \cos(\omega_0 t + \phi_1 + \pi/2) & \\ a(t) &= \ddot{x}(t) = -\omega_0^2 A \cos(\omega_0 t + \phi_1) = \omega_0^2 A \cos(\omega_0 t + \phi_1 + \pi) \end{align} So the velocity will lead the displacement by \(\pi/2\) and the acceleration will lead by \(\pi\).

Using Euler's formula: \begin{equation*} e^{i \omega_0 t} = \cos(\omega_0 t) + i \sin(\omega_0 t), \end{equation*} we can view the cosine terms as the real parts of the complex exponentials \begin{align} x(t) &= A \Re\{e^{i \omega_0 t + \phi_1}\} & \\ v(t) &= A \omega_0 \Re\{e^{i \omega_0 t + \phi_1 + \pi/2}\} & \\ a(t) &= A \omega_0^2 \Re\{e^{i \omega_0 t + \phi_1 + \pi}\} \end{align} each of which we can represent as a vector in the complex plane.

Click figure to download the CDF demo.

The kinetic energy is simply \begin{equation}\label{eq:T} T = \frac{1}{2}m v^2 = \frac{1}{2}m A^2 \omega_0^2 \sin^2(\omega_0 t + \phi_1) \end{equation}

The potential energy is \begin{equation*} U = -\int F dx = k\int x dx = \frac{1}{2}k x^2 = \frac{1}{2}A^2 k\cos^2(\omega_0 t + \phi_1). \end{equation*} Using \(\omega_0^2 = k/m\) we can write this as \begin{equation}\label{eq:U} U = \frac{1}{2}m A^2 \omega_0^2 \cos^2(\omega_0 t + \phi_1). \end{equation} So that the total energy is the sum of \eqref{eq:T} and \eqref{eq:U}, \begin{equation} E = T + U = \frac{1}{2}m A^2 \omega_0^2 \end{equation} since \(\sin^2\theta+\cos^2\theta = 1\). The total energy is conserved as might be expected for a closed system.

2
Duration: 5 min

A thin loop is hung on a horizontal nail. If the period of small angle oscillations is 2.0s what is the radius of the loop?

2
Duration: 10 min

A bullet of mass \(m\) is fired at a wooden block of mass \(M\) that rests on a frictionless surface and is attached to a wall by an ideal spring of spring constant \(k\). The block is initially at rest. Assume the bullet effectively instantaneously embeds itself in the block and sets the combined system into motion. Note that this is an inelastic collision so kinetic energy is *not* conserved. If the maximum amplitude of the spring is observed to be \(x_0\) after the collision, what was the initial velocity of the bullet, \(v_0\)?

2
Duration: 5 min

Show that the following different ways of writing the solutions to the harmonic oscillator are all equivalent to each other:

- \(x(t) = A \cos(\omega_0 t + \phi_1)\),
- \(x(t) = B \sin(\omega_0 t + \phi_2)\),
- \(x(t) = C \cos(\omega_0 t) + D \sin(\omega_0 t)\),
- \(x(t) = E e^{i \omega_0 t} + E^* e^{-i \omega_0 t}\), for \(E\) complex where \(^*\equiv\) complex conjugation.

2
Duration: 5 min

If we were to suspend a mass on a spring vertically and have gravity act on the mass as well, how would the resulting oscillations change?