Category Archives: Classical Mechanics

Tsiolkovsky Rocket Equation

In this note, we derive the so called Tsiolkovsky rocket equation or simply rocket equation. It is given by
\begin{equation}
\label{eq:rocket}
\Delta v=v_e\ln\frac{m_0}{m_f}=I_{\mathrm{sp}}g_0\ln\frac{m_0}{m_f}
\end{equation}
where

  • $\Delta v$ is the maximum change of velocity of the vehicle;
  • $v_e=I_{\mathrm{sp}}g_0$ is the effective exhaust velocity;
  • $g_0=9.8\ \mathrm{m}/\mathrm{s}^2$ is the gravitational acceleration of an object in a vacuum near the surface of the Earth;
  • $m_0$, called wet mass, is the initial mass, including propellant;
  • $m_f$, called dry mass, is the final total mass without propellant.

The equation \eqref{eq:rocket} is named after the Russian scientist Konstantin Eduardovich Tsiolkovsky (September 5, 1857 – September 19, 1935). He is dubbed the father of Russian rocket science. It is also called fuel equation.

By the Newton’s second law of motion, the net external force $\vec{F}$ to the change in linear momentum $\vec{P}$ of the whole system (including rocket and exhaust) is
$$\vec{F}=\frac{d\vec{P}}{dt}=\lim_{\Delta t\to 0}\frac{\Delta\vec{P}}{\Delta t}$$
$\Delta\vec{P}=\vec{P}_2-\vec{P}_1$, where $\vec{P}_1=m\vec{V}$ is the momentum of the rocket at time $t=0$ and $\vec{P}_2=(m-\Delta m)(\vec{V}+\Delta\vec{V})+\Delta m\vec{V}_e$ is the momentum of the rocket and exhausted mass at $t=\Delta t$. Here, with respect to the observer, $\vec{V}$ is the velocity of the rocket at time $t=0$, $\vec{V}$ is the velocity of the rocket at time $t=\Delta t$, $\vec{V}_e$ is the velocity of the mass added to the exhaust and lost by the rocket during tim $\Delta t$, $m$ is the mass of the rocket at time $t=0$, and $m-\Delta m$ is the mass of the rocket at time $t=\Delta t$. The velocity of the exhaust $\vec{V}_e$ in the observer frame is related to the velocity of the exhaust in the rocket $\vec{v}_e$ by $$\vec{v}_e=\vec{V}_e-\vec{V}$$ or $$\vec{V}_e=\vec{V}+\vec{v}_e$$ Now, $\Delta\vec{P}$ can be written as $$\Delta\vec{P}=m\Delta\vec{V}+\vec{v}_e\Delta m-\Delta m\Delta\vec{V}$$ Since $\Delta m\to 0$ as $\Delta t\to 0$, we have \begin{equation}\label{eq:rocket2}\vec{F}=m\frac{d\vec{V}}{dt}+\vec{v}_e\frac{dm}{dt}\end{equation} If there are no external forces, then $\vec{F}=0$ i.e. $\frac{d\vec{P}}{dt}=0$ (conservation of linear momentum). \eqref{eq:rocket2} then becomes the separable differential equation \begin{equation}\label{eq:rocket3}-m\frac{d\vec{V}}{dt}=\vec{v}_e\frac{dm}{dt}\end{equation} Assuming that $\vec{v}_e$ is constant (Tsiolkovsky’s hypothesis) $v_e$, and integrating \eqref{eq:rocket3} we have $$\int_v^{v+\Delta v}dv=-v_e\int_{m_0}^{m_f}\frac{dm}{m}$$
where $v=|\vec{V}|$, $\Delta v=|\Delta\vec{V}|$, $m_0$ is the initial total mass and $m_f$ is the final mass. Finally, evaluating the integral yields the rocket equation \eqref{eq:rocket}.

From \eqref{eq:rocket}, we obtain
\begin{equation}
\label{eq:rocket4}
\frac{m_0-m_f}{m_0}=1-\frac{m_f}{m_0}=1-e^{-\frac{\Delta v}{v_e}}
\end{equation}
The equation \eqref{eq:rocket4} gives rise to the percentage of the initial total mass which has to be propellant. This tells us how efficient the rocket engine is as shown in the following example.

Example. Let us consider an SSTO (Single-Stage-To-Orbit) rocket. (Most rockets we are seeing are two-stage-to-orbit or three-stage-to-orbit ones.) The rocket uses liquid hydrogen/liquid oxygen for its propellant, so specific impulse is about $I_{\mathrm{sp}}=350$ s. The exhaust velocity is then given by $v_e=3.43$ km/s. $\Delta v$ needed to get the rocket to a 322 km high LEO (Low Earth Orbit) is 8 km/s. With these values \eqref{eq:rocket4} is evaluated to be
$$1-e^{-\frac{\Delta v}{v_e}}=0.9$$
This means that 90% of the initial total mass has to be propellant. The remaining 10% is for the engines, the fuel tank, and the payload. The payload would account for only about 1% of the initial total mass. This kind of rocket is obviously very inefficient and expensive.

In the Sci-Fi novella The Wandering Earth by Liu Cixin (there is also a movie of the same title on Netflix), the Sun will soon become a supernova and facing the ultimate cataclysmic extinction event, people on Earth turns their entire planet into a spaceship and attempt to relocate it to Proxima Centauri which is the closest star to the Sun (about 4.2 light-years). This is an extremely bold idea even in Chinese scale. (Well, they built the Great Wall!) Disappointingly though, in here, I showed using the rocket equation that it is not even possible for startship Earth to break away from its orbit around the Sun.

Brachistochrone Curve

Brachistochrone Problem: Find the shape of the curve down which a bead sliding from rest and accelerated by gravity will slip from on point to another in the least time. Here, we do not consider friction.

Due to conservation of energy, we have
\begin{equation}
\label{eq:energy}
\frac{1}{2}mv^2=mgy
\end{equation}
Solving \eqref{eq:energy} for the speed $v$, we obtain
$$v=\sqrt{2gy}$$
The time $T_{PQ}$ for the bead to travel from a point $P$ to $Q$ is
\begin{align*}t_{PQ}&=\int_P^Q\frac{ds}{v}\\&=\int_P^Q\frac{\sqrt{dx^2+dy^2}}{\sqrt{2gy}}\\&=\int_P^Q\sqrt{\frac{1+y_x^2}{2gy}} \end{align*}
Let $f(y_x,y)=\sqrt{\frac{1+y_x^2}{2gy}}$. The path from $P$ to $Q$ which minimizes $t_{PQ}$ can be found by solving the Euler-Lagrange equation ([1])
\begin{equation}
\label{eq:E-L}
\frac{\partial f}{\partial y}-\frac{d}{Dx}\frac{\partial f}{\partial y_x}=0
\end{equation}
It can be easily shown that \eqref{eq:E-L} is equivalent to
\begin{equation}
\label{eq:E-L2}
\frac{\partial f}{\partial x}-\frac{d}{dx}\left(f-y_x\frac{\partial f}{\partial y_x}\right)=0
\end{equation}
Since $f$ does not explicitly depend on $x$, $\frac{\partial f}{\partial x}=0$, so from \eqref{eq:E-L2}, this leads to
$$f-y_x\frac{\partial f}{\partial y_x}=C$$
for some constant $C$. On the other hand, we have
$$f-y_x\frac{\partial f}{\partial y_x}=\frac{1}{\sqrt{2gy(1+y_x^2}}$$
Hence, we arrive at the differential equation
$$\frac{dy}{dx}=\sqrt{\frac{k^2-y}{y}}$$
where $k^2=\frac{1}{2gC^2}$. The differential equation is separable and it can be written as
\begin{equation}
\label{eq:de}
\sqrt{\frac{y}{k^2-y}}dy=dx
\end{equation}
Let $\sqrt{\frac{y}{k^2-y}}=\tan\frac{\theta}{2}$. Then
$$y=k^2\sin^2\frac{\theta}{2}=\frac{1}{2}k^2(1-\cos\theta)$$
The equation \eqref{eq:de} becomes
$$k^2\sin^2\frac{\theta}{2}d\theta=dx$$
Integrating both sides with the half-angle formula $\sin^2\frac{\theta}{2}=\frac{1-\cos\theta}{2}$, we obtain
$$x=\frac{1}{2}k^2(\theta-\sin\theta)+C_1$$
for some constant $C_1$. With the condition $P(0,0)$, i.e. $x=y=0$ when $\theta=0$, we have $C_1=0$ and so,
$$x=\frac{1}{2}k^2(\theta-\sin\theta)$$
Therefore, the curve on which the bead is sliding down in the shortest time is a cycloid given by the parametric equations
\begin{align*}x&=\frac{1}{2}k^2(\theta-\sin\theta)\\y&=\frac{1}{2}k^2(1-\cos\theta)\end{align*}
In geometry, a cycloid is the curve traced by a point on a circle as it rolls along a straight line without slipping.

Figure 1. Cycloid with $k=1$ and $0\leq\theta\leq 2\pi$.

References:

  1. George Arfken, Mathematical Methods for Physicists, Third Edition, Academic Press, 1985

Lagrangian and Hamiltonian

In physics, there are two things that play a very crucial role in describing the motion of a particle. One is called Lagrangian and the other Hamiltonian. These are closely related. It appears to be almost inconceivable for physicists not to be able to do physics without a Lagrangian. There is a good reason for that. The Lagrangian is what gives rise to the equation of motion. Interestingly, I am currently working on a Lagrangian-free quantum theory, called geometric quantum theory, in which the equation of motion is obtained from geometric considerations. There is no need for introducing a Lagrangian to begin with. I will talk about it elsewhere as I make progress on it.

So what is a Lagrangian? In classical mechanics, a Lagrangian $L({\bf x},\dot{\bf x},t)$ is defined by \begin{equation}\begin{aligned}L({\bf x},\dot{\bf x},t)&=T-V\\&=\frac{1}{2}m{\dot x_i}^2-V({\bf x},t)\end{aligned}\label{eq:lagrangian}\end{equation} Note that a Lagrangian is a function of three variables ${\bf x}$, $\dot{\bf x}$, and $t$. Since a Lagrangian is acting on functions, it is rather called a functional in mathematics. The equation \begin{equation}\label{eq:E-L}\frac{d}{dt}\frac{\partial L}{\partial\dot x_i}-\frac{\partial L}{\partial x_i}=0\end{equation} with the Lagrangian in \eqref{eq:lagrangian} results in the familiar equation of motion $$m\frac{d^2{\bf x}}{dt^2}=-{\bf \nabla}V$$ The equation \eqref{eq:E-L} is called the Euler-Lagrange equation. In general, a Lagrangian is not necessarily given as $T-V$. For another example, one may consider the Lagrangian \begin{equation}\label{eq:lagrangian2}L({\bf x},\dot{\bf x},t)=\frac{1}{2}m{\dot x_i}^2-e\phi({\bf x},t)+\frac{e}{c}\dot x_i A_i({\bf x},t)\end{equation} where $\phi$ is a scalar potential and ${\bf A}$ such that \begin{align*}{\bf B}&={\bf\nabla}\times{\bf A}\\{\bf\nabla}\phi&=-{\bf E}-\frac{1}{c}\frac{\partial{\bf A}}{\partial t}\end{align*}The Euler-Lagrange equation \eqref{eq:E-L} then yields the familiar Lorentz force $$m\frac{d^2{\bf x}}{dt^2}=e{\bf E}+\frac{e}{c}{\bf v}\times{\bf B}$$

A Lagrangian doesn’t have to be given in terms of rectangular coordinates and it can be written in terms of generalized coordinates ${\bf q}$ and $\dot{\bf q}$ if there is a functional relationship $$x_i=x_i(q_1,q_2,q_3)$$ One can easily show that $L({\bf q},\dot{\bf q},t)$ satisfies the Euler-Lagrange equation \begin{equation}\label{eq:E-L2}\frac{d}{dt}\frac{\partial L}{\partial\dot q_i}-\frac{\partial L}{\partial q_i}=0\end{equation}

Example. [Cylindrical Coordinates] In terms of the cylindrical coordinates \begin{align*}x&=r\cos\theta\\y&=r\sin\theta\\z&=z\end{align*} the Lagrangian \eqref{eq:lagrangian} is written as $$L=\frac{1}{2}m({\dot r}^2+r^2{\dot\theta}^2+{\dot z}^2)-V$$ The Euler-Lagrange equation \eqref{eq:E-L2} yields the equations \begin{align*}m\ddot r-mr{\dot\theta}^2+\frac{\partial V}{\partial r}&=0\\mr^2\ddot\theta+2mr\dot r\dot \theta+\frac{\partial V}{\partial\theta}&=0\\m\ddot z+\frac{\partial V}{\partial z}&=0\end{align*} If $V=V(r)$ then $$mr^2\ddot\theta+2mr\dot r\dot \theta=\frac{d}{dt}(mr^2\dot\theta)=0$$ which implies that $mr^2\dot\theta$ is constant, i.e. we obtain the conservation of angular momentum.

If $\frac{\partial L}{\partial q_i}=0$, then the coordinate $q_i$ is called a cyclic coordinate. Since $\frac{d}{dt}\frac{\partial L}{\partial\dot q_i}=0$, $\frac{\partial L}{\partial\dot q_i}$ is conserved. The quantity $p_i:=\frac{\partial L}{\partial\dot q_i}$ is called a canonical momentum or a conjugate momentum.

Example. For the Lagrangian \eqref{eq:lagrangian}, the canonical momentum $p_i$ is $$p_i=m\dot x_i$$ and for the Lagrangian \eqref{eq:lagrangian2}, the canonical momentum is $$p_i=m\dot x_i+\frac{e}{c}A_i({\bf x},t)$$

Example. [Spherical Coordinates] In terms of spherical coordinates \begin{align*}x&=r\sin\theta\cos\varphi\\y&=r\sin\theta\sin\varphi\\z&=r\cos\theta\end{align*} the Lagrangian \eqref{eq:lagrangian} is written as $$L=\frac{1}{2}m({\dot r}^2+r^2{\dot\theta}^2+r^2{\dot\varphi}^2\sin^2\theta)-V$$ The Euler-Lagrange equation \eqref{eq:E-L2} then yields \begin{align*}\frac{d}{dt}(m\dot r)-mr{\dot\theta}^2-mr{\dot\varphi}^2\sin^2\theta+\frac{\partial V}{\partial r}&=0\\\frac{d}{dt}(mr^2\dot\theta)-mr^2{\dot\varphi}^2\sin\theta\cos\theta+\frac{\partial V}{\partial\theta}&=0\\\frac{d}{dt}(mr^2\dot\varphi\sin^2\theta)+\frac{\partial V}{\partial\varphi}&=0\end{align*}

Hamiltonians

Given a Lagrangian $L({\bf q},\dot{\bf q},t)$, it can be shown that \begin{equation}\label{eq:legendre}d(p_i\dot q_i-L)=(dp_i)\dot q_i-\frac{\partial L}{\partial q_i}dq_i-\frac{\partial L}{\partial t}dt\end{equation} \eqref{eq:legendre} is called the Lengendre transformation. Let us denote $$H({\bf q},{\bf p},t):=\dot q_ip_i-L$$ and call it a Hamiltonian. Since $H$ is a function of $(q_i,p_i,t)$, we have \begin{equation}\label{eq:hamiltonian}dH=\frac{\partial H}{\partial q_i}dq_i+\frac{\partial H}{\partial p_i}dp_i+\frac{\partial H}{\partial t}dt\end{equation} Comparing \eqref{eq:legendre} and \eqref{eq:hamiltonian} we obtain the Hamilton’s equations \begin{equation}\begin{aligned}\frac{\partial H}{\partial q_i}&=-\dot p_i\\\frac{\partial H}{\partial p_i}&=\dot q_i\\\frac{\partial H}{\partial t}&=-\frac{\partial L}{\partial t}\end{aligned}\label{eq:hamiltoneqn}\end{equation}

If $L$ does not depend on $t$, $\frac{\partial L}{\partial t}=0$ and consequently we have $\frac{dH}{dt}=0$, i.e. $H$ is constant. If the kinetic energy is a quadratic term of $\dot q_i$ and the potential is a function of only $q_i$, then $$\dot q_i\frac{\partial T}{\partial\dot q_i}=2T=\dot q_i\frac{\partial L}{\partial\dot q_i}=\dot q_ip_i$$ and thereby \begin{align*}H&=\dot q_ip_i-L\\&=2T-(T-V)=T+V\end{align*} Hence, in this case the total energy is conserved.

Example. For the Lagrangian \eqref{eq:lagrangian} the Hamiltonian $H$ is given by $$H=\frac{p_i^2}{2m}+V$$ where $p_i=m\dot x_i$.

Example. For the Lagrangian \eqref{eq:lagrangian}, the Hamiltonian $H$ is given by $$H=\frac{1}{2m}\left(p_i-\frac{e}{c}A_i\right)^2+e\phi$$ where $p_i=m\dot x_i+\frac{e}{c}A_i$. If the vector potential ${\bf A}$ depends only on the position vector ${\bf x}$, one can show that $H$ is constant in time.

References:

[1] Quantum Mechanics, H.-S. Song (in Korean)

Harmonic Motion: Damped

 

The harmonic motion we discussed here is not physically realistic because it does not take damping due to friction into account. In this note, we discuss damped harmonic motion which is physically more realistic. If $x$ is the displacement from the equilibrium position, then the restoring force exerted by a spring is $-kx$ and the retarding force is $-cv$ (friction is proportional to the velocity $v$). Consequently we have the equation $$F=-kx-cv=-kx-c\dot{x}$$ or equivalently the second-order linear equation \begin{equation}\label{eq:damped}m\ddot{x}+c\dot{x}+kx=0\end{equation} To solve the equation \eqref{eq:damped} we still attempt to use the trial solution $x=e^{qt}$. As a result we obtain \begin{equation}\label{eq:chareq}mq^2+cq+k=0\end{equation} \eqref{eq:chareq} is called the auxiliary equation or the characteristic equation. Its solution is given by $$q=\frac{-c\pm\sqrt{c^2-4mk}}{2m}$$ There are three physically distinct cases:

  1. $c^2>4mk$: overdamping
  2. $c^2=4mk$: critically damping
  3. $c^2<4mk$: underdamping

Case 1. Let $-\gamma_1<0$ and $-\gamma_2<0$ be two real values of $q$. Then the general solution (we will discuss, using linear algebra, why this is indeed the general solution later) is $$x=A_1e^{-\gamma_1 t}+A_2e^{-\gamma_2 t}$$ The motion is nonoscillatory and the displacement $x$ decays to 0 in an exponential matter.

Example. The second-order linear differential equation $\ddot{x}+3\dot{x}+2x=0$ has the general solution $$x(t)=A_1e^{-2t}+A_2e^{-t}$$

x(t)=exp(-2t)+2exp(-t), t=0..8

Case 2. $q$ has one real value $q=-\gamma$ where $\gamma=\frac{c}{2m}$. The equation \eqref{eq:damped} can be written as \begin{equation}\label{eq:criticdamped}\left(\frac{d}{dt}+\gamma\right)^2x=\left(\frac{d}{dt}+\gamma\right)\left(\frac{d}{dt}+\gamma\right)x=0\end{equation} Let $u=\frac{d}{dt}+\gamma$. Then \eqref{eq:criticdamped} reduces to  a first-order differential equation $$\left(\frac{d}{dt}+\gamma\right)u=\frac{du}{dt}+\gamma u=0$$ which is separable. It’s solution is $u=A_1e^{-\gamma t}$. Now we have a first-order linear differential equation $$\frac{dx}{dt}+\gamma x=A_1e^{-\gamma t}$$ whose solution is given by $$x(t)=e^{-\gamma t}(A_1 t+A_2)$$

Example. The second-order linear differential equation $$\ddot{x}+2\dot{x}+x=0$$ has the general solution $$x(t)=e^{-t}(A_1t+A_2)$$

x(t)=exp(-t)(t+2), t=0..10

This also represents a nonoscillatory motion and the displacement $x$ decays to zero asymptotically. Critical damping produces an optimal return to the equilibrium position, so it is used, for example, for galvanometer suspensions.

Case 3. Suppose that $c$ is small enough so that $c^2-4mk<0$. In this case, $q$ are two complex numbers $-\gamma\pm i\omega_1$ where $\gamma=\frac{c}{2m}$, $\omega_1=\sqrt{\frac{k}{m}-\frac{c^2}{4m^2}}=\sqrt{\omega_0^2-\gamma^2}$. So $e^{(-\gamma+i\omega_1)t}$, $e^{(-\gamma-i\omega_1)t}$ are solutions of \eqref{eq:damped}. Due to the linearity of \eqref{eq:damped}, the real part $e^{-\gamma t}\cos\omega_1 t$and the imaginary part $e^{-\gamma t}\sin\omega_1 t$ of $e^{(-\gamma+i\omega_1)t}$ are also solutions of \eqref{eq:damped}. Hence, $$x(t)=ae^{-\gamma t}\cos\omega_1 t+be^{-\gamma t}\sin\omega_1 t$$ is the general solution. This can be written as $$x(t)=Ae^{-\gamma t}\cos(\omega_1 t-\theta_0)$$ where $A=\sqrt{a^2+b^2}$ and $\theta_0=\tan^{-1}\left(\frac{b}{a}\right)$. Note that the angular frequency (or natural frequency) $\omega_1$ is smaller than that of undamped harmonic oscillator $\omega_0$. $$\omega_1=\sqrt{\omega_0^2-\gamma^2}=\omega_0\sqrt{1-\left(\frac{\gamma}{\omega_0}\right)^2}$$ If $\frac{\gamma}{\omega_0}<1$ then $\sqrt{1-\left(\frac{\gamma}{\omega_0}\right)^2}\approx 1-\frac{1}{2}\frac{\gamma^2}{\omega_0^2}$. So $$\omega_1\approx \omega_0-\frac{\gamma^2}{2\omega_0}$$

Example. Let $m=1$, $c=4$ and $k=404$. Then the resulting equation of damped harmonic oscillator is $$\ddot{x}+4\dot{x}+404=0$$ Let us solve this equation with $x(0)=1$ and $\dot{x}(0)=0$. The characteristic equation $$q^2+4q+404=0$$ has two complex solutions $q=-2\pm 20i$. Thus $$x(t)=ae^{-2t}\cos(20t)+be^{-2t}\sin(20t)$$ $x(0)=1$ results in $a=1$. To determine $b$ we need $\dot{x}$. $$\dot{x}=-2e^{-2t}\cos(20t)-20e^{-2t}\sin(20t)-2be^{-2t}\sin(20t)+20be^{-2t}\cos(20t)$$ The initial condition $\dot{x}(0)=0$ results in $b=\frac{1}{10}$. Hence $x(t)$ is given by $$x(t)=e^{-2t}\cos(20t)+\frac{1}{10}e^{-2t}\sin(20t)$$ Since $A=\sqrt{a^2+b^2}=\frac{\sqrt{101}}{10}$ and $\theta_0=\tan^{-1}\left(\frac{b}{a}\right)=\tan^{-1}\left(\frac{1}{10}\right)\approx 0.099669$, $x(t)$ also can be written as $$x(t)=\frac{\sqrt{101}}{10}e^{-2t}\cos(20t-0.099669)$$

x(t)=1.00499exp(-2t)cos(20t-0.099669), t=0..pi

Differentiate the total energy $$E=\frac{1}{2}m\dot{x}^2+\frac{1}{2}kx^2$$ with respect to $t$. \begin{align*}\frac{dE}{dt}&=m\ddot{x}\dot{x}+k\dot{x}x\\&=(m\ddot{x}+kx)\dot{x}\\&=(-c\dot{x})\dot{x}\\&=-c(\dot{x})^2<0\end{align*} This is the rate at which energy is dissipated into heat by friction.

Harmonic Motion: Undamped

A force exerted by an elastic cord or by a spring obeys Hooke’s law $F=-kx$ where $x$ is the displacement of the equilibrium position.

Credit: This picture was taken from a Wikipedia page at https://en.wikipedia.org/wiki/File:Hookes-law-springs.png

From Newton’s second law of motion we have $F=ma=m\ddot{x}$, so we obtain the second order linear differential equation \begin{equation}\label{eq:undamped}m\ddot{x}+kx=0\end{equation} Solving \eqref{eq:undamped} for $\ddot{x}$ we obtain $\ddot{x}=-\frac{k}{m}x\sim -x$. For a trial solution, $x=e^{qt}$ is a candidate. To see if this trial solution works, plug it back into \eqref{eq:undamped}. $$m\ddot{x}+kx=mq^2e^{qt}+ke^{qt}=0$$ i.e. \begin{equation}\label{eq:auxeq}mq^2+k=0\end{equation} whose solutions are $$q=\pm i\sqrt{\frac{k}{m}}=\pm i\omega_0$$ where $\omega_0=\sqrt{\frac{k}{m}}$. The equation \eqref{eq:auxeq} is called the auxiliary equation or the characteristic equation. So, $x_1=e^{i\omega_0 t}$ and $x_2=e^{-i\omega_0 t}$ are solutions of \eqref{eq:undamped}. It can be easily shown that their linear combination \begin{equation}\label{eq:undamped2}x=A_1e^{i\omega_0 t}+A_2e^{-i\omega_0 t}\end{equation} is also a solution of \eqref{eq:undamped}. \eqref{eq:undamped2} is a complex solution so it is not suitable for the physical analysis of a motion governed by \eqref{eq:undamped}. What we need is a real solution. It turns out that the real part and the imaginary part of $e^{i\omega_0 t}$ also, respectively, satisfy \eqref{eq:undamped}. This is due to the linearity of \eqref{eq:undamped}. Hence, an alternative form of the solution which is real is \begin{equation}\label{eq:undamped3}x=a\cos\omega_0 t+b\sin\omega_0 t\end{equation} Using a trigonometric identity \eqref{eq:undamped3} can be written as \begin{equation}\label{eq:undamped4}x=\sqrt{a^2+b^2}\cos(\omega_0 t-\theta_0)\end{equation} where $\theta_0=\tan^{-1}\frac{b}{a}$ or as \begin{equation}\label{eq:unddamped4a}x=\sqrt{a^2+b^2}\sin(\omega_0 t+\phi_0)\end{equation} where $\phi_0=\tan^{-1}\frac{a}{b}$. The angles $\theta_0$ and $\phi_0$ are called the phase.

Some Terminologies

The equation \eqref{eq:undamped} is called the differential equation of the harmonic oscillator. $\sqrt{a^2+b^2}$ is the amplitude (the maximum value of $x$) The period $T_0$ of the oscillation is the time required for one complete cycle. $$T_0=\frac{2\pi}{\omega_0}=2\pi\sqrt{\frac{m}{k}}$$ The linear frequency of oscillation $f_0$ is the number of cycles in unit time. $$f_0=\frac{1}{T_0}=\frac{\omega_0}{2\pi}=\frac{1}{2\pi}\sqrt{\frac{k}{m}}$$ $\omega_0=2\pi f_0$ is called the angular frequency and is also called the natural frequency.

Example. Suppose that a mass weighing 10 lb stretches a spring 2 in. If the mass is displaced an additional 2 in and is then set in motion with an initial upward velocity of 1 ft/s, determine the position of the mass at any later time. Also determine the period, amplitude, and phase of the motion.

Solution. $k=10\mathrm{lb}/2\mathrm{in}=60\mathrm{lb}/\mathrm{ft}$ and $m=\mathrm{weight}/g=10\mathrm{lb}/32\mathrm{ft}/\mathrm{s}^2$. Thus $$m\ddot{x}+kx=\frac{10}{32}\ddot{x}+60x=0$$ i.e. $$\ddot{x}+192x=0$$ The auxiliary equation is $q^2+192=0$ and $q=\pm i8\sqrt{3}$. The solution $x(t)$ is then given by $$x(t)=a\cos(8\sqrt{3}t)+b\sin(8\sqrt{3}t)$$ From the initial conditions $x(0)=\frac{1}{6}$ ft and $\dot{x}(0)=-1$ ft/s, we find $a=\frac{1}{6}$ and $b=-\frac{1}{8\sqrt{3}}$. The natural frequency is $\omega_0=8\sqrt{3}\approx 13.856$ rad/s. The period is $T_0=\frac{2\pi}{\omega_0}=\frac{2\pi}{8\sqrt{3}}\approx 0.453$ sec. The amplitude is $\sqrt{a^2+b^2}=\sqrt{\frac{19}{576}}\approx 0.182$ ft. The phase is $\theta_0=\tan^{-1}\left(\frac{b}{a}\right)=-\frac{\sqrt{3}}{4}\approx -0.408645$ rad. Therefore, $x(t)$ can be written as $$x(t)=0.182\cos(13.856t+0.40864)$$ Figure 1 shows a complete cycle.

Figure 1. A complete cycle of x(t)=0.182cos(13.856t+0.40864)

Figure 2. shows an animation of $x(t)$.

Figure 2. An animation of x(t)=0.182cos(13.856t+6.283185308k+0.40864) with k=1..5, t=1..100, and FPS=10

The Conservation of Total Energy

Let us calculate the work done by an external force $F_{\mathrm{ext}}$ in moving the mass from the equilibrium position ($x=0$) to some position $x$. $F_{\mathrm{ext}}=-F=kx$ and $$W=\int F_{\mathrm{ext}} dx=\int_0^x kx dx=\frac{1}{2}kx^2$$ The work $W$ is stored in the spring as potential energy $V(x)=W=\frac{1}{2}kx^2$. The potential energy $V(x)$ for a force $F(x)$ is defined by \begin{equation}\label{eq:conservative}F=-\frac{dV}{dx}\end{equation} In our case, $F=-\frac{dV}{dx}=-kx$. For any force $F$ satisfying \eqref{eq:conservative}, the total energy $$E=T+V,$$ the sum of the kinetic energy $T=\frac{1}{2}m\dot{x}^2$ and the potential energy $V$, is  constant. For this reason, a force satisfying \eqref{eq:conservative} is called a conservative force.  Since $$\ddot{x}=\frac{d\dot{x}}{dt}=\frac{d\dot{x}}{dx}\frac{dx}{dt}=v\frac{dv}{dx},$$ $$F(x)=m\ddot{x}=mv\frac{dv}{dx}=\frac{1}{2}m\frac{dv^2}{dx}=\frac{dT}{dx}$$ The work done on the particle by impress force $F(x)$ is $$\int F(x)dx=\int dT=\frac{1}{2}m\dot{x}^2+C_1$$ where $C_1$ is a constant. On the other hand, from \eqref{eq:conservative} we also have $$\int F(x)dx=-\int dV=-V(x)+C_2$$ where $C_2$ is a constant. Therefore, $$T+V=\frac{1}{2}m\dot{x}^2+V(x)=E$$ is a constant. In our case the conservation of total energy $E$ \begin{equation}\label{eq:totalenergy}E=\frac{1}{2}m\dot{x}^2+\frac{1}{2}kx^2\end{equation} can be more directly shown. Differentiating the total energy \eqref{eq:totalenergy} with respect to $t$ \begin{align*}\frac{dE}{dt}&=m\ddot{x}\dot{x}+kx\dot{x}\\&=(m\ddot{x}+kx)\dot{x}\\&=0\end{align*} So the restoring force $F=-kx$ for an undamped harmonic motion is conservative.

The solution \eqref{eq:undamped4} can be also obtained by considering energy. Solving \eqref{eq:totalenergy} for $\dot{x}$ \begin{equation}\label{eq:velocityundamped}\dot{x}=\pm\sqrt{\frac{2E-kx^2}{m}}\end{equation} This is a separable equation. For $\dot{x}=\sqrt{\frac{2E-kx^2}{m}}$ it’s solution is  $$x=\sqrt{\frac{2E}{k}}\sin\left(\sqrt{\frac{k}{m}}t+\phi_0\right)$$ and for $\dot{x}=-\sqrt{\frac{2E-kx^2}{m}}$, it’s solution is $$x=\sqrt{\frac{2E}{k}}\cos\left(\sqrt{\frac{k}{m}}t-\theta_0\right)$$ So the amplitude is $A=\sqrt{\frac{2E}{k}}$ and the angular frequency is $\omega_0=\sqrt{\frac{k}{m}}$. In order for \eqref{eq:velocityundamped} to make sense $\frac{2E-kx^2}{m}\geq 0$ i.e. the total energy is greater than or equal to the potential energy $V(x)=\frac{1}{2}kx^2$. This means that the particle is confined to the region $-\sqrt{\frac{2E}{k}}\leq x\leq\sqrt{\frac{2E}{k}}$. Also the speed becomes zero when $V(x)=E$. This means that the particle must come to rest and reverse its motion at $x=\pm\sqrt{\frac{2E}{k}}$. The points $x=\pm\sqrt{\frac{2E}{k}}$ are called the turning points of the motion. The maximum value of $\dot{x}$ occurs at $x=0$. $v_{\max}=\frac{k}{m}A=\omega_0A$ and $E=\frac{1}{2}mv_{\max}^2=\frac{1}{2}kA^2$.