<?xml version="1.0" encoding="UTF-8"?>

<record version="1" id="1289">
 <title>mass spring example of oscillation</title>
 <name>MassSpringExampleOfOscillation</name>
 <created>2026-09-26 15:30:29</created>
 <modified>2026-09-26 15:30:29</modified>
 <type>Example</type>
<parent id="1288">oscillation</parent>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="pacs" code="46.40.-f"/>
	<category scheme="pacs" code="45.20.-d"/>
	<category scheme="pacs" code="05.45.-a"/>
 </classification>
 <keywords>
	<term> oscillation</term>
	<term>simple harmonic motion</term>
	<term>mass-spring oscillator</term>
	<term>amplitude</term>
	<term>phase</term>
	<term>angular frequency</term>
	<term>period</term>
	<term>frequency</term>
	<term>energy</term>
	<term>phase space</term>
	<term>initial conditions</term>
 </keywords>
 <preamble>% this is the default PhysicsLibrary preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics).
% If you use \includegraphics{figure} with no file extension, PhysicsLibrary
% will prefer figure.png before falling back to figure.eps.
\usepackage{graphicx}
\DeclareGraphicsExtensions{.png,.jpg,.jpeg,.pdf,.eps}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here</preamble>
 <content>\section*{Oscillations in Physics: A Detailed Worked Mass-Spring Example}

This article develops one  problem in enough detail to connect most of the basic quantities introduced in the PhysicsLibrary entry on oscillations.  The goal is not merely to obtain $x(t)$, but to interpret the amplitude, phase, period, frequency, velocity, acceleration, turning points, energy exchange, and phase-space trajectory as parts of one physical oscillation.

The example is deliberately given nonzero initial displacement and nonzero initial velocity.  This prevents the phase constant from being hidden by a specially chosen initial condition and makes the general sinusoidal solution physically meaningful.

\section*{Problem}

A block of mass
\[
m=0.50\,{\rm kg}
\]
slides without friction on a horizontal surface and is attached to an ideal spring of spring constant
\[
k=18\,{\rm N/m}.
\]
Let $x=0$ denote the equilibrium position and let positive $x$ point to the right.  At $t=0$ the block is at
\[
x_0=+0.060\,{\rm m}
\]
and is moving to the right with velocity
\[
v_0=+0.48\,{\rm m/s}.
\]

Determine and interpret the complete oscillation.  In particular:

\begin{enumerate}
\item derive the equation of motion from Newton's second law;
\item find the natural angular frequency, period, and frequency;
\item solve for $x(t)$ using the initial conditions;
\item express the result in amplitude-phase form and determine $A$ and $\phi$;
\item obtain $v(t)$ and $a(t)$;
\item find the maximum speed and maximum acceleration;
\item find the first positive turning point, the first equilibrium crossing, and the first negative turning point after $t=0$;
\item calculate the total mechanical energy and verify it using the initial conditions;
\item show how kinetic and potential energy exchange during the oscillation;
\item derive the phase-space ellipse in the $(x,v)$ plane.
\end{enumerate}

\begin{center}
\includegraphics{osc_example_fig01_mass_spring_setup.png}

{\small Figure 1. Mass-spring system at $t=0$.  The block begins to the right of equilibrium and is initially moving farther to the right, while the spring restoring force points back toward equilibrium.}
\end{center}

\section*{Solution}

\subsection*{1. Derive the equation of motion}

The spring force obeys Hooke's law,
\[
F_s=-kx.
\]
The minus sign is important.  If $x&gt;0$, the spring force points toward negative $x$; if $x&lt;0$, the spring force points toward positive $x$.  The force is therefore restoring.

Newton's second law gives
\[
m\ddot x=-kx.
\]
Move all terms to the left:
\[
m\ddot x+kx=0.
\]
Dividing by $m$,
\[
\ddot x+{k\over m}x=0.
\]
Define
\[
\omega_0^2={k\over m}.
\]
Then the equation becomes
\[
\ddot x+\omega_0^2x=0.
\]
This is the differential equation of an undamped simple harmonic oscillator.

\subsection*{2. Natural angular frequency, period, and frequency}

For the given system,
\[
\omega_0=\sqrt{{k\over m}}
=\sqrt{{18\over0.50}}
=\sqrt{36}
=6.00\,{\rm rad/s}.
\]

The period is
\[
T={2\pi\over\omega_0}
={2\pi\over6}
={\pi\over3}
\mathrel{\simeq}1.047\,{\rm s}.
\]

The frequency is
\[
f={1\over T}={\omega_0\over2\pi}
\mathrel{\simeq}0.955\,{\rm Hz}.
\]

Thus the block completes slightly less than one full cycle each second.

\subsection*{3. Solve the differential equation with the initial conditions}

A convenient general solution is
\[
x(t)=C\cos(\omega_0t)+D\sin(\omega_0t).
\]
With $\omega_0=6$, this becomes
\[
x(t)=C\cos(6t)+D\sin(6t).
\]

At $t=0$,
\[
x(0)=C.
\]
Since $x(0)=0.060\,{\rm m}$,
\[
C=0.060\,{\rm m}.
\]

Differentiate the general solution:
\[
v(t)=\dot x(t)
=-6C\sin(6t)+6D\cos(6t).
\]
At $t=0$,
\[
v(0)=6D.
\]
Therefore
\[
D={v_0\over6}
={0.48\over6}
=0.080\,{\rm m}.
\]

The motion is therefore
\[
x(t)=0.060\cos(6t)+0.080\sin(6t)\quad {\rm m}.
\]

This form is already a complete solution.  The amplitude-phase form, however, makes the geometry of the oscillation easier to read.

\subsection*{4. Convert to amplitude-phase form}

Write the same motion as
\[
x(t)=A\cos(\omega_0t+\phi).
\]
Using
\[
\cos(\omega_0t+\phi)
=\cos(\omega_0t)\cos\phi
-\sin(\omega_0t)\sin\phi,
\]
we identify
\[
C=A\cos\phi,
\]
and
\[
D=-A\sin\phi.
\]

Squaring and adding gives
\[
A^2=C^2+D^2.
\]
Thus
\[
A=\sqrt{(0.060)^2+(0.080)^2}
=0.100\,{\rm m}.
\]

Now
\[
\cos\phi={C\over A}=0.60,
\]
while
\[
\sin\phi=-{D\over A}=-0.80.
\]
Therefore the correct quadrant gives
\[
\phi=-0.9273\,{\rm rad}
=-53.13^\circ.
\]

The complete amplitude-phase solution is
\[
x(t)=0.100\cos(6t-0.9273)\quad {\rm m}.
\]

The negative phase tells us that the oscillator is already partway through its cycle at $t=0$.  Because the initial velocity is positive, the block has not yet reached its positive turning point.

\subsection*{5. Velocity and acceleration}

Differentiate the displacement:
\[
v(t)=\dot x(t)
=-0.600\sin(6t-0.9273)\quad {\rm m/s}.
\]

Differentiate again:
\[
a(t)=\ddot x(t)
=-3.600\cos(6t-0.9273)\quad {\rm m/s^2}.
\]

Because
\[
x(t)=0.100\cos(6t-0.9273),
\]
we can also write
\[
a(t)=-\omega_0^2x(t)=-36x(t).
\]
This is the defining kinematic property of simple harmonic motion: acceleration is proportional to displacement and always directed toward equilibrium.

\begin{center}
\includegraphics{osc_example_fig02_time_histories.png}

{\small Figure 2. Normalized displacement, velocity, and acceleration over one period.  Velocity is shifted by one quarter cycle relative to displacement, while acceleration is exactly opposite in phase to displacement.}
\end{center}

\subsection*{6. Maximum speed and maximum acceleration}

The velocity has amplitude
\[
v_{\rm max}=A\omega_0.
\]
Therefore
\[
v_{\rm max}=(0.100)(6.00)=0.600\,{\rm m/s}.
\]

The acceleration has amplitude
\[
a_{\rm max}=A\omega_0^2.
\]
Thus
\[
a_{\rm max}=(0.100)(36)=3.60\,{\rm m/s^2}.
\]

The maximum speed occurs at equilibrium, where all the mechanical energy is kinetic.  The maximum acceleration occurs at the turning points, where $|x|=A$.

\subsection*{7. Important times during the first cycle}

Let the phase be
\[
\psi(t)=6t-0.9273.
\]

At $t=0$,
\[
\psi(0)=-0.9273.
\]
Since the block is moving to the right, it first reaches the positive turning point when
\[
\psi=0.
\]
Therefore
\[
6t-0.9273=0,
\]
so
\[
t_{+A}=0.1545\,{\rm s}.
\]
At this instant,
\[
x=+A=+0.100\,{\rm m},
\qquad
v=0.
\]

The first equilibrium crossing occurs when
\[
\psi={\pi\over2}.
\]
Thus
\[
t_{x=0}={{\pi\over2}+0.9273\over6}
\mathrel{\simeq}0.4163\,{\rm s}.
\]
At this crossing the block is moving toward negative $x$, so
\[
v=-v_{\rm max}=-0.600\,{\rm m/s}.
\]

The first negative turning point occurs when
\[
\psi=\pi.
\]
Therefore
\[
t_{-A}={\pi+0.9273\over6}
\mathrel{\simeq}0.6781\,{\rm s}.
\]
At this instant,
\[
x=-0.100\,{\rm m},
\qquad
v=0.
\]

These times show the physical cycle directly: the block first moves farther right, stops, reverses, passes through equilibrium at maximum speed, and then reaches the left turning point.

\subsection*{8. Total mechanical energy}

For an ideal horizontal mass-spring oscillator,
\[
E=K+U,
\]
where
\[
K={1\over2}mv^2
\]
and
\[
U={1\over2}kx^2.
\]

At a turning point $v=0$ and $|x|=A$, so
\[
E={1\over2}kA^2.
\]
Using $k=18\,{\rm N/m}$ and $A=0.100\,{\rm m}$,
\[
E={1\over2}(18)(0.100)^2
=0.0900\,{\rm J}.
\]

We can verify this independently from the initial conditions.  Initially,
\[
U_0={1\over2}kx_0^2
={1\over2}(18)(0.060)^2
=0.0324\,{\rm J},
\]
and
\[
K_0={1\over2}mv_0^2
={1\over2}(0.50)(0.48)^2
=0.0576\,{\rm J}.
\]
Thus
\[
E_0=K_0+U_0
=0.0576+0.0324
=0.0900\,{\rm J}.
\]
The two calculations agree, as they must for an ideal conservative oscillator.

\subsection*{9. Energy exchange through the cycle}

Substituting
\[
x=A\cos\psi
\]
into the spring potential gives
\[
U={1\over2}kA^2\cos^2\psi.
\]
Because
\[
v=-A\omega_0\sin\psi,
\]
the kinetic energy is
\[
K={1\over2}mA^2\omega_0^2\sin^2\psi.
\]
But
\[
m\omega_0^2=k,
\]
so
\[
K={1\over2}kA^2\sin^2\psi.
\]
Adding,
\[
E={1\over2}kA^2
\left(\sin^2\psi+\cos^2\psi\right).
\]
Therefore
\[
E={1\over2}kA^2,
\]
which is constant.

At a turning point, $U=E$ and $K=0$.  At equilibrium, $K=E$ and $U=0$.  Between those locations, the energy is shared between the two forms.

\begin{center}
\includegraphics{osc_example_fig03_energy_exchange.png}

{\small Figure 3. Kinetic and spring potential energy exchange twice per oscillation cycle, while their sum remains constant at $0.090$ J.}
\end{center}

\subsection*{10. Phase-space ellipse}

The displacement and velocity are
\[
x=A\cos\psi,
\]
\[
v=-A\omega_0\sin\psi.
\]
Divide the first equation by $A$ and the second by $A\omega_0$:
\[
{x\over A}=\cos\psi,
\]
\[
{v\over A\omega_0}=-\sin\psi.
\]
Square and add:
\[
{x^2\over A^2}
+{v^2\over A^2\omega_0^2}
=1.
\]

For this oscillator,
\[
A=0.100\,{\rm m},
\qquad
A\omega_0=0.600\,{\rm m/s},
\]
so the phase-space trajectory is
\[
{x^2\over(0.100)^2}
+{v^2\over(0.600)^2}
=1.
\]

The oscillator therefore traces a closed ellipse in the $(x,v)$ plane.  A closed orbit is another way of representing the periodic return of an ideal conservative oscillator to the same dynamical state.

\begin{center}
\includegraphics{osc_example_fig04_phase_space.png}

{\small Figure 4. Phase-space trajectory of the oscillator.  The initial state $(x_0,v_0)=(0.060,0.480)$ lies on the same constant-energy ellipse traced throughout the motion.}
\end{center}

\section*{Physical interpretation of the complete motion}

This one example contains most of the basic ideas used to describe an oscillation:

\begin{itemize}
\item The equilibrium is at $x=0$.
\item The restoring force $F=-kx$ always points toward equilibrium.
\item The amplitude $A=0.100\,{\rm m}$ sets the turning points.
\item The angular frequency $\omega_0=6.00\,{\rm rad/s}$ is determined by $k/m$, not by the initial displacement or velocity.
\item The phase constant $\phi=-0.9273$ rad records where in the cycle the chosen clock starts.
\item The period $T=1.047$ s is the time required to return to the same position and velocity.
\item Velocity is largest at equilibrium and zero at the turning points.
\item Acceleration is zero at equilibrium and largest in magnitude at the turning points.
\item Energy continuously transfers between kinetic and spring potential energy while the total remains constant.
\item The closed phase-space ellipse represents the same conserved-energy motion geometrically.
\end{itemize}

The initial conditions change $A$ and $\phi$, but for an ideal linear mass-spring oscillator they do not change $\omega_0$.  That separation between the properties of the system and the choice of initial state is one of the most useful features of linear oscillation theory.

\section*{Checks on the result}

Several quick checks help catch errors in oscillator calculations.

First, the units of angular frequency are inverse seconds:
\[
\sqrt{{k\over m}}
=\sqrt{{{\rm N/m}\over{\rm kg}}}
=\sqrt{{{\rm kg\,m/s^2}\over{\rm m\,kg}}}
={1\over{\rm s}}.
\]

Second, substituting $x(t)$ into
\[
\ddot x+\omega_0^2x=0
\]
must give zero.

Third, the initial conditions must be recovered exactly:
\[
x(0)=0.060\,{\rm m},
\qquad
v(0)=0.48\,{\rm m/s}.
\]

Fourth, the energy computed from the amplitude must equal the energy computed from the initial position and velocity:
\[
{1\over2}kA^2
=
{1\over2}mv_0^2+{1\over2}kx_0^2.
\]

All four checks are satisfied here.

\section*{Summary of numerical results}

For
\[
m=0.50\,{\rm kg},
\qquad
k=18\,{\rm N/m},
\qquad
x_0=0.060\,{\rm m},
\qquad
v_0=0.48\,{\rm m/s},
\]
the ideal oscillation is
\[
x(t)=0.100\cos(6t-0.9273)\quad {\rm m},
\]
with
\[
v(t)=-0.600\sin(6t-0.9273)\quad {\rm m/s},
\]
and
\[
a(t)=-3.600\cos(6t-0.9273)\quad {\rm m/s^2}.
\]
The characteristic quantities are
\[
A=0.100\,{\rm m},
\qquad
\omega_0=6.00\,{\rm rad/s},
\]
\[
T=1.047\,{\rm s},
\qquad
f=0.955\,{\rm Hz},
\]
\[
v_{\rm max}=0.600\,{\rm m/s},
\qquad
a_{\rm max}=3.60\,{\rm m/s^2},
\]
and
\[
E=0.0900\,{\rm J}.
\]

\section*{References}
\begin{thebibliography}{9}

\bibitem{Taylor}
J. R. Taylor,
\emph{Classical Mechanics},
University Science Books, 2005.

\bibitem{MarionThornton}
J. B. Marion and S. T. Thornton,
\emph{Classical Dynamics of Particles and Systems}, 5th ed.,
Brooks/Cole, 2004.

\bibitem{French}
A. P. French,
\emph{Vibrations and Waves},
W. W. Norton, 1971.

\bibitem{Feynman}
R. P. Feynman, R. B. Leighton, and M. Sands,
\emph{The Feynman Lectures on Physics}, Vol. I,
Basic Books.

\end{thebibliography}</content>
</record>
