\begin{problem}
A force of $64\U{N}$ stretches a certain spring by $16\U{cm}$. A block
of mass $4\U{kg}$ is hung from the spring and the spring-mass
combination executes vertical simple harmonic oscillations when at
$t=0$, the mass is pulled down by $12\U{cm}$ below its equilibrium
position and released from rest. Assume gravitational potential energy
is zero at the highest position ($y=0$) of oscillation of the mass
$m$. \\
\Part{a} Write down an equation for position of the mass assuming the
clock reads $t=0$ at the instant the mass is released (i.e~at the
lowest point of vertical oscillations). \\
\Part{b} Find the shortest time needed for the mass to go through a
point $8\U{cm}$ above the equilibrium position from the instant it is
released. \\
\Part{c} Find the position and the magnitude and direction of its
velocity of motion at $t=0.10\pi\U{s}$. \\
\Part{d} What is the total energy of the spring mass combination at
any instant of oscillation?
\end{problem}

\begin{solution}
\Part{a}
From the initial condition, we know that the equation must look like
\begin{equation}
  y(t) = -A[\cos(\omega t) - 1] \;,
\end{equation}
where the $-1$ shifts the $\cos$ down so $y(t)_\text{max}=0$.
$A=12\U{cm}$ is given in the problem, but we need to find $\omega$
\begin{align}
  k &= \frac{F}{\Delta l} = 400\U{N/m} \\
  \omega &= \sqrt{\frac{k}{m}} = \sqrt{\frac{F}{m\Delta l}}
    = 10\U{rad/s} \\
  y(t) &= \ans{-12\U{cm}\cdot[\cos(10\U{rad/s}\cdot t)-1]}
\end{align}

\Part{b}
Let $\Delta y=8\U{cm}$.  Then
\begin{align}
  y(t)+A &= -A\cos(\omega t) = \Delta y \\
  \omega t &= \arccos\p({\frac{-\Delta y}{A}}) \\
  t &= \frac{\arccos\p({\frac{-\Delta y}{A}})}{\omega}
    = \ans{0.230\U{s}}
\end{align}

\Part{c}
We get the position by plugging in
\begin{equation}
  y(t=0.10\pi\U{s}) = -12\U{cm}\cdot[\cos(10\U{rad/s}\cdot 0.10\pi\U{s}) + 1]
    = -12\U{cm}\cdot[\cos(\pi\U{rad}) + 1]
    = -12\U{cm}\cdot[-1 + 1]
    = \ans{0}
\end{equation}
This is the high point of the oscillation so $v=\ans{0}$

\Part{d}
Energy is conserved, so we can pick our favorite point.  How about
when all the energy is stored in the spring.  We'll need to know
the total amount the spring stretched though.  At equilibrium
\begin{align}
  mg &= k\Delta L_\text{eq} \\
  \Delta L_\text{eq} &= \frac{mg}{k} = 9.8\U{cm} \;,
\end{align}
so
\begin{equation}
  E = \frac{1}{2} k (\Delta L_\text{eq} - A)^2
    = \frac{1}{2}\cdot 400\U{N/m}\cdot(0.098\U{m} - 0.120\U{m})^2
    = \ans{96.8\U{mJ}}
\end{equation}

Note: I used $g = 9.8\U{m/s$^2$}$ throughout, while Prof.~Venkat used
$10\U{m/s$^2$}$, which is why some of our answers are slightly different.
\end{solution}
