## 3b: Simple Harmonic Motion Simulation

The following is a simulation of a mass on a spring. Simple springs exert a force that is proportional to how far they are stretched or compressed so the motion will be simple harmonic motion. The force acting on the mass in this case is called a Hooke's Law force which can be described mathematically as F = -κy where κ is called the spring constant, in N/m indicating the stiffness of the spring and y is the location of the mass from some equilibrium position. We will see many examples of forces on musical instruments that are approximately a Hooke's law force in later chapters ( the effect of other forces such as friction are considered in the next chapter). The graph in the simulation shows the y (vertical) location of the mass. This displacement is called the amplitude of the motion.

Simulations take a few seconds to load.

show velocity              spring constant = −

### Exercises:

3.1. Click on the 'set parameter' button, left click the mouse over the red mass on the spring and drag it to a starting location. Click 'play' to see the motion and the graph of the mass location. Describe the shape of the graph.

The period of the motion, T, is usually measured in seconds and is defined to be the time it takes to go through one complete cycle. For the spring case it can be measured by finding the time it takes to go return from one highest point to the next (or from one lowest point to the next, etc.) by timing how long it takes the mass

3.2. Determine the period of the motion in the simulation the following way. Click on the graph and you should see two numbers in a yellow box. The first is the time, the second the vertical location. Find the time of one peak and the time of the next peak and subtract the second number from the first to get the period of motion.

3.3. Measure the period for several different initial displacements (drag the ball to different heights, play the simulation and measure the period). Does the initial displacement (the initial amplitude) have any effect on the period?

3.4. Is the period affected by whether you start the mass above or below it's equilibrium position? (Measure it if you aren't sure.)

3.5. Try different spring constant values, κ, between 0.5 N/m to 5.0 N/m, releasing the mass at the same point each time. What is the relationship between spring constant and period? Note that you can right-click on the graph to create a copy at any time to save the results of several different cases.

The inverse of the period is called the frequency, f measured in Hertz, Hz, which is a cycle per second. So f = 1/T. This is also the natural frequency of the mass-spring system.

3.6. What is the frequency of the initial motion that you measured in question 3.2?

For a given spring the natural frequency is determined by the mass hanging on it and the stiffness of the spring; f0 = (κ/m)1/2/2π.

3.7 What happens to the frequency of motion if you hang a heavier mass on the same spring?

3.8. Reset the simulation with the reset button. Click the velocity check box, set the parameters, drag the mass and click play. The position of the mass is shown in blue and the speed is shown in red. At time zero, what is the position of the mass? What is the velocity of the mass at time zero?

3.9. Look at the next time the mass is at a maximum. What is the velocity at that time? What is the velocity at all the maximum amplitudes in the graph?

3.10. Look at the time when the velocity is a maximum. What is the location of the mass at this time? What is the location of the mass, each time the velocity is a maximum?

3.11. Write a general statement about the relationship between the masses position and velocity; "every time the mass is at a maximum the velocity is ____ and every time the mass passes through equilibrium the velocity is _____."

The mathematical equation that describes the position of the mass as a function of time, y(t), is y(t) = A cos (2π f t + φ) where A is the maximum amplitude (the initial amplitude), f is the frequency, t is time and φ is called the phase angle. The phase (measured in radians) shifts the starting point of the graph to the left or right. In the simulation the phase is zero because the motion starts when the mass is at a maximum. If the graph started with the mass already moving and not at its maximum position the equation would need a phase angle to shift the graph to match where the mass was at time zero. cos is the cosine function. For our purposes it is just a button on your calculator (you put numbers in, hit the button and it spits out a new number called the cosine of the original number). One slight detail to be aware of is that your calculator needs to be in radian mode for this equation to work properly (not degrees).

This equation is sometimes written using a different frequency called the angular frequency, ω given by ω = 2π f, measured in radians per second (rad/s). In this case the equation looks like y(t) = A cos (ω t + φ).

If you do not have a graphing calculator, open this web based meta calculator in a new tab (or do a search to find one you like such as desmos calculator) for the following questions. Click on Graphing Calculator to get started. For the meta calculator equations should be in the form y = some function of x and you will use calculator notation. So for example to graph the equation y = 6x2 you would enter y = 6*x^2. To enter a cosine function you use cos. For these exercises you will need to click the radian button at the top of the calculator.

3.12. Use the buttons on the right of the screen to enter y = cos(2*pi*f*x) next to the box labeled 1. where f is the frequency you found in question 3.6 (Hint: You can cut from this page and paste it into the calculator box). Click the graph button at the bottom of the screen to see the graph. How does this graph compare to the one you saw initially for the motion of the mass?

3.13. Click back and change the entry to be y = 4*cos(2*pi*f) and view the graph. What is the effect of multiplying the cosine by a number? The number in front of the cosine is called the amplitude of the motion.

3.14. Click back and change the entry to be y = 4*cos(2*pi*f + 1.5) and view the graph. Experiment with values other than 1.5 for the phase angle. What is the effect of changing the phase?

3.15. Click back and change the entry to be y = 4*sin(2*pi*f) and view the graph. What is the difference between the sine and cosine function?

3.16. Can you think of a way to make a cosine function look like a sine function by adjusting the phase angle? Try it and explain what you have to do.

### Summary

Anything that experiences a Hooke's law force (a force proportional to displacement) will undergo simple harmonic motion. Simple harmonic motion can be described mathematically by a sine or cosine function.