nextnext page arrow

myphysicslab – single spring

this simulation shows a single mass on a spring, which is connected to a wall. this is an example of a simple linear oscillator.
you can change parameters in the simulation such as mass, spring stiffness, and friction (damping). you can drag the mass with your mouse to change the starting position. if you don't see the simulation try instructions for enabling java. scroll down to see the math!

puzzles

try using the graph and changing parameters like mass or spring stiffness to answer these questions about the spring simulation: you'll find the answers below.

to show the graph and parameters, click on the "show graph+controls" button above. you can set what variables are shown on the vertical or horizontal axis by selecting from the pop-up menu above. to change a parameter, click on it, type the new value and hit the enter key.

physics

define the following variables and constants a spring generates a force proportional to how far it is stretched (and acting in the opposite direction to the stretch) fspring = −k × stretch if we adjust the coordinate system so that x = 0 corresponds to the spring being unstretched, then the stretch of the spring is simply equal to x. the spring force becomes fspring = − k x in addition, there is a damping (friction) force that resists the motion. it is proportional to the velocity. so we add fdamping = −b v to get the total force f = fspring + fdamping = − k xb v combining this with newton's law of motion f = m a, and the definition of acceleration as the second derivative of position a = x'' we have the differential equation: m x'' = −k xb v or equivalently:
x'' = − km xbm x' (1)
equation (1) is the equation of motion for the spring, defining exactly what happens over time.

you can actually see equation (1) visually if you turn on the graph in the simulation. suppose there is no damping (set damping to zero). then if you set the graph on the simulation to plot acceleration against position, you will get a straight line, with slope = −k/m. so if you increase the stiffness of the spring, the line becomes steeper. if you increase the mass, the line becomes less steep.

numerical solution

to solve this equation numerically (ie. by computer) we use the runge-kutta method. to do so we need to convert the second order differential equation (1) into a set of first order differential equations. note that we can write the acceleration as the first derivative of velocity: x'' = v'. therefore we can express equation (1) as a system of two first order differential equations: x' = v v' = − km xbm v this is the form that we need in order to use the runge-kutta method for numerically solving the differential equation.

to begin the simulation, we initialize the two variables x,v for their value at time t=0. then we use the runge-kutta algorithm to calculate the values of x,v after a short time interval, and this continues indefinitely.

analytic solution

an analytic solution uses mathematics to find the solution instead of the brute force of the computer. the advantage is that we can get some more insight from the analytic solution, instead of having to analyze zillions of numbers that come from a numerical solution.

with no damping (b = 0) and the block initially not moving, the analytic solution is given by x(t) = x_0 \cos(\sqrt{k/m} \; t) where x0 = initial position of the block and t = time. the period of the oscillation is the time it takes to repeat. from the solution we see that the oscillation repeats when \sqrt{k/m} \; t = 2 \pi, and so the period is t = 2 \pi \sqrt{m/k}
the frequency is the inverse of the period: frequency = \frac{1}{2 \pi} \sqrt{k/m} so we predict that you can check these predictions by modifying the parameters on the simulation (you'll need a stopwatch to time the frequency).

you can view a page with the derivation of the analytic solution.

puzzle answers

what is the relationship between acceleration and position?

answer: it is a linear relationship as given by the equation x'' = − km x where x = position, x'' = acceleration, m = mass, and k = spring stiffness.

how do mass or spring stiffness affect the relationship between acceleration and position?

answer: from the equation x'' = − km x we know that there is a simple linear relationship between acceleration and position. the mass and spring stiffness affect the slope of this line.

how do mass or spring stiffness affect the period or frequency of the oscillation?

answer: the analytic solution is x(t) = x_0 \cos(\sqrt{k/m} \; t) and the frequency is given by frequency = \frac{1}{2 \pi} \sqrt{k/m} so we predict that

beats by dre cheaplegend blue 11smichael kors outletlouis vuitton outletlegend blue 11slebron 12jordan retro 11sac louis vuittonLebron 11lebron 12black infrared 6sjordan 11 legend bluesac louis vuittonjordan 11 legend bluelouis vuitton outletbeats by dre outletbeats by dre cheapmichael kors outletjordan 11 legend bluejordan 11 legend blue