# 2.1.3: Simple Harmonic Motion Simulation

$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

The following is a simulation of a mass on a spring. The graph shows the $$y$$ (vertical) location of the mass at different times. The force acting on the mass in this case is called a Hooke's Law force: $$F = -κy$$ where $$κ$$ is called the spring constant, in $$\text{N/m}$$ indicating the stiffness of the spring and $$y$$ is the location of the mass from some equilibrium position.

The points on the graph of the motion of the mass on a spring can be described by the mathematical function $$y(t)=A\cos (-2\pi ft+\phi )$$ where $$\cos$$ is the cosine function, $$f$$ is the frequency, $$A$$ is the amplitude (maximum displacement) and $$\phi$$ is the phase in radians. For any time, $$t$$, the displacement of the mass can be found by calculating $$y(t)=A\cos (-2\pi ft+\phi )$$ if the frequency and starting point (phase) are known.

## Simulation Questions:

1. Drag the mass to some initial location using the mouse. Click 'play' button (lower left) to see the motion and the graph of the mass location. Determine the period of oscillation from the graph by finding the difference in time between two peaks.
2. Now find the period from the times of two consecutive times when the mass is at the bottom of its oscillation. Is this the same period you got in the first question? Explain.
3. Try a different starting displacement and measure the period. Does changing the amplitude of the oscillation change the period?
4. Clicking on the graph shows the coordinates of the mouse in a yellow box at the lower left. Determine the period and frequency of this motion from the values on the graph (Hint: Frequency in $$\text{Hz}$$ is the inverse of period $$f=1/T$$.
5. Check the 'V' box to see graphs of both position and velocity. Where is the mass when the velocity is a maximum? Where is the mass when the velocity becomes zero?
6. Try different spring constant values, $$κ$$, between $$0.5\text{ N/m}$$ to $$5.0\text{ N/m}$$, resetting and releasing the mass at the same point each time. What is the relationship between spring constant and frequency?
7. For a given spring the frequency is determined by the mass hanging on it and the stiffness of the spring; $$f = (κ/m)^{1/2}/(2π)$$. Measure the frequency for the case of a spring constant, $$κ$$ equal to $$2.0$$. What must be the mass on the end of this spring? Verify that you get the same mass by measuring the frequency for several different spring constants (this is equivalent to hanging the same mass on several different springs).
8. According to the equation for frequency, what would happen to the period of oscillation of a spring-mass system if the mass is doubled?
9. Why is it more convenient to use a cosine function with a phase of zero for the description of the motion of the mass in this case? (Hint: Does the mass start with an amplitude of zero or a maximum amplitude?)

1. As we will see in Chapter 6, angular frequency is given by $$ω = 2πf$$. What is the angular frequency of the motion of the mass?
2. The points on the graph of the motion of the mass on a spring can be described by the mathematical function $$y(t)=A\cos (-\omega t+\phi )$$ where $$\cos$$ is the cosine function, $$ω$$ is the angular frequency and $$\phi$$ is the phase in radians. Using this equation and a calculator (in radian mode!), what is the location of the mass when $$t=0$$and $$\phi =0$$? What is the location of the mass when $$t=0$$ and $$\phi =\pi$$ (don't forget we are in radian mode)? Explain what the phase angle, $$\phi$$ tells you about the initial position ($$t=0$$) of the mass on the spring.
3. If $$y(t)=A\cos (-\omega t+\phi )$$ is the location of the mass on the spring and the time derivative (using calculus) of location is velocity, then the velocity of the mass is given by $$v(t)=-A\omega \sin (-\omega t+\phi )$$. Check the 'V' box and run a simulation with an initial amplitude of $$6.0\text{ m}$$ and a spring constant of $$2$$. From the graph find the angular frequency and calculate the speed amplitude $$v_{max} =A\omega$$. How does this number compare with the maximum value on the velocity graph, are they the same?
4. Find an expression for the acceleration of a mass on a spring, based on the position given by $$y(t)=A\cos (-\omega t+\phi )$$ and the fact that acceleration is the second derivative of position with respect to time (this requires calculus).

## Chapter Three Summary

Vibrating objects can be described by their period (in seconds) or the inverse, their frequency (in Hertz). The phase angle tells where in the cycle a measurement of time or space is starting. Anything that experiences a Hooke's law force (a force proportional to displacement) without being driven and without friction will undergo simple harmonic motion. Simple harmonic motion can be described mathematically by a sine or cosine function.

This page titled 2.1.3: Simple Harmonic Motion Simulation is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Kyle Forinash and Wolfgang Christian via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9019802,"math_prob":0.99978966,"size":4878,"snap":"2023-40-2023-50","text_gpt3_token_len":1171,"char_repetition_ratio":0.17275338,"word_repetition_ratio":0.08482676,"special_character_ratio":0.25850758,"punctuation_ratio":0.07847296,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9998591,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-03T03:56:54Z\",\"WARC-Record-ID\":\"<urn:uuid:21e66821-f4fe-4637-a5cc-176721abafe7>\",\"Content-Length\":\"121788\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a287b61e-9b39-451b-868e-27febd8a869b>\",\"WARC-Concurrent-To\":\"<urn:uuid:64f5a3df-9523-4542-bcd7-3b89c499c3f9>\",\"WARC-IP-Address\":\"3.162.103.49\",\"WARC-Target-URI\":\"https://phys.libretexts.org/Bookshelves/Waves_and_Acoustics/Book%3A_Sound_-_An_Interactive_eBook_(Forinash_and_Christian)/02%3A_Vibrations/2.01%3A_Vibrations/2.1.03%3A_Simple_Harmonic_Motion_Simulation\",\"WARC-Payload-Digest\":\"sha1:26VYBJS3FO7QPQ6WDOYKVC4RVBXR4WTI\",\"WARC-Block-Digest\":\"sha1:PMYR3Q6VIXREGI33QVVLJNLABDG3G3GE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100484.76_warc_CC-MAIN-20231203030948-20231203060948-00716.warc.gz\"}"}