Assignment 3

Name:
Student #:

Q1

Consider two particles in the xy plane of masses m1=1 and m2=2 connected by a spring with spring contant k and of equilibrium length L.  The initial positions and velocity components are provided below.

a)

Solve for the positions of the two particles as a function of time from t=0 to T, and create an animation of their motion, with the particle represented by disks of different colours.  T=10.

Remove["Global`*"]

k=40;  (* spring constant *)
L=4;  (* Equilibrium spring length *)
m1=1;
m2=2;

T=10;  (* total simulation time *)

x1init=0;  (* initial positions *)
y1init=0;
x2init=5;
y2init=-1;

v1xinit=-1;  (* initial velocities *)
v1yinit=-2;
v2xinit=1.5;
v2yinit=1.5;

b)

Add to the animation another disk representing the centre of mass of the two particles.  It should travel in a straight line.

c)

Plot the distance between the particles as a function of time from t=0 to T/5  (from t=0 to 2).  Why is the curve not symmetric about the equilibrium length of the spring?  [Normally we think that a mass on a spring vibrates from -(Subscript[Δx, max]) to (Subscript[Δx, max]).]

d)

Plot on the potential, kinetic and total mechanical energy as functions of time from t=0 to T/5  (t=0 to 2).  Total mechanical energy should be constant.