Consider a system of two masses, m1 and m2 , attached to three springs, with spring constants of k1, k2, and k3, where the outside two springs are connected to walls and the internal spring connects the two masses. The configuration is shown below.
We can set x(t) and y(t) equal to the positions of the left and right mass from their respective equilibrium positions.
1. Write two second order differential equations which describe the forces on each mass. Do this in the comments of your code. (Hint: Newton's Law F=ma, Hooke's law F=-kx.,F=Force, m=mass, a=acceleration, k=spring constant, x=displacement from equilibrium position.)
2. Write a matrix A from the equation in the form x→' = Ax→ which describes the dynamics of the mass spring system. (Hint: A should be a 4x4 matrix). Display the matrix A.
3. Let m1 = m2 = 1, k1 = k3 = 1, k2 = 2 Solve the general matrix equation by finding the eigenvalues and eigenvectors and using the equation x→(t) = c1eλ1tV→1+c2eλ2tV→2+c3eλ3tV→3+c4eλ4tV→4. Display the eigenvalues and eigenvectors.
4. Assume your initial conditions are x=1 and y=-1. Apply the initial conditions to solve for the ci. Plot x(t) and y(t) on the same figure for t=0 to t=50. On a second figure plot y'(t) versus x'(t) (Phase Plane). Display both plots with legend, title, and axes labeled.
5. Repeat part 4 with the initial conditions x=1, y=0. Display both plots with legend, title, and axes labeled.