A first tour through examples - Chapter 4 s

# The harmonic oscillator

We know turn to an elementary example coming from classical mechanics.

The harmonic oscillator is the simplest example of a particle of mass $m$ constrained to a straight line, which we take to be the $x$-axis, subject to a force $f(x)$ when it is located at $x$. Assuming that this force is independent of the velocity $\dot{x}$ amounts to excluding friction. According to Newton’s second law, we have

$$m \ddot{x}=f(x).$$

In the case of the harmonic oscillator, $f(x)=-kx$, where $k=\text{const.}>0$. The minus sign indicates that the force is restoring. An instance of a harmonic oscillator is a Hookean spring : $x$ is the deflection from its relaxed length. Letting $\omega^2=\frac{k}{m}$ we rewrite the equation as

$$\ddot{x}+\omega^2 x =0.$$

(Notice that $\omega$ has the dimension of a frequency, that is, the inverse of a time.)

This is called a second-order differential equation since the unknown function $x(t)$ is defined by an equation involving its second derivative. Maybe you remember how to solve analytically this equation in term of sines and cosines. This is because it is a linear equation. For nonlinear equations, finding an analytical solution is in general out of reach. That is why we want to develop methods for deducing the behavior of equations like this one without actually solving it.

Phase plane representation.
To apply the same strategy as for Volterra’s model about sardines and sharks, we have to make a preliminary step. The state of our harmonic oscillator is characterized by two variables : its current position $x$ and velocity $\dot{x}$. The trick is to rewrite the equation $\ddot{x}+\omega^2 x =0$ in terms of $x$ and $y :=\dot{x}$ as follows :

$$\begin{cases} \dot{x}= y\\ \dot{y}=-\omega^2 x. \end{cases}$$

The first equation is just the definition of velocity, and the second one is the original differential equation written in terms of $y$, since $\dot{y}=\ddot{x}$.

What we achieved is to reinterpret the motion of a mass on the line subject to a linear restoring force as an imaginary point particle flowing in the $xy$-plane according to the vector field $(y,-\omega^2 x)$. We treat velocity of the mass of the original equation as a second dimension. In particular, we can see the acceleration geometrically, namely as the $y$-component of the position of the particle in the phase plane.

We can take into account that the mass undergoes a friction force that is proportional to its velocity. This leads to the equation $\ddot x= -kx -\varepsilon \dot x$, where $\epsilon>0$ is the friction coefficient. In the phase plane this gives

$$\begin{cases} \dot{x}= y\\ \dot{y}=-\omega^2 x-\epsilon y. \end{cases}$$

When $\epsilon=0$, we see that, as for Volterra’s model, all trajectories in the phase plane are closed curves, very likely ellipses. What do this have to do with the original problem ? The answer is beautifully simple. The fixed point $(x,y)=(0,0)$ corresponds to static equilibrium of the system : the mass is at rest at its equilibrium position and will remain there forever. The closed trajectories correspond, as one can expect, to periodic motions, i.e., oscillations of the mass. If you know or remember about elementary physics, it is easy to show why the trajectories are actually ellipses given by the equation $\omega^2 x^2 + y^2=C$, where $C\geq 0$ is a constant determined by the initial position and speed of the mass : this is equivalent to conservation of energy. However, as soon as $\epsilon>0$, we see that solutions spiral towards the origin. The interpretation is simple : now the trajectories fail to close because the mass loses a bit of energy at each instant.

Two-dimensional linear systems.
Let us end with a mathematical comment. The equation

$$\begin{cases} \dot{x}= y\\ \dot{y}=-\omega^2 x-\epsilon y. \end{cases}$$

is a special instance of a two-dimensional linear system that is generically of the form

$$\begin{cases} \dot{x}= ax+by\\ \dot{y}=cx+dy \end{cases}$$

where $a,b,c,d$ are real parameters. If we use boldface to denote vectors, this can be written more compactly in matrix form as

$$\dot{\boldsymbol{x}}=A \boldsymbol{x}$$

where

$$A=\begin{pmatrix}a & b\\ c & d\end{pmatrix}\quad\text{and}\quad\boldsymbol{x}=\begin{pmatrix}x\\ y\end{pmatrix}.$$

For the harmonic oscillator one has

$$A=\begin{pmatrix}0 & 1\\ -\omega^2 & -\epsilon\end{pmatrix}.$$

Later on, we shall see how to classify all phase portraits of two-dimensional linear systems.