MyPhysicsLab - Double Spring 1D

Instructions: click near to a square and drag with your mouse

vertical axis:    horizontal axis:    graph type:

If you've ever played with an oscilloscope you've probably seen curves like these. They are called Lissajous curves and occur because the behavior is generated by simple sine and cosine functions.

Physics

The two springs act independently, so it is easy to figure out what are the forces acting on the two blocks.  Label the springs and blocks as follows:

wall-spring1-block1-spring2-block2

We'll assume the origin is at the connection of the spring to the wall.  Define the following variables:

And define the following constants:

The springs exert force based on their amount of stretch according to

F = -k*stretch

The forces on the blocks are therefore

F1 = -k1L1+k2L2
F2 = -k2L2

The stretch of the spring is calculated based on the position of the blocks.

L1 = x1-R1
L2 = x2-x1-w1-R2

Now using Newton's law F = m a and the definition of acceleration as a = x'' we can write two second order differential equations.

m1x1'' = -k1(x1-R1)+k2(x2-x1-w1-R2)
m2x2'' = -k2(x2-x1-w1-R2)

Numerical Solution

It's easy to convert the above second order equations to a set of first order equations, by using the definition of velocity as v = x'. Then we have

x1' = v1
x2' = v2
v1' = -(k1/m1)(x1-R1)+(k2/m1)(x2-x1-w1-R2)
v2' = -(k2/m2)(x2-x1-w1-R2)

This is the form that we need in order to use the Runge-Kutta method for numerically solving the differential equation.