However, in the present case we can simplify the analysis because the
numbers are nice. First, there are relationship between sine and
cosine when the arguments differ by certain phase factors. Whenever
you have a phase which is some integer multiple of , there may be a
possible simplification. In this case we have the
relationship

so that mass 2 starts out at the equilibrium position at .

Next, notice that the period is 20 ms, while the time of impact is 5 ms, or . So, the collision happens when mass 2 is at the end of the first quarter of its motion. Since the equation is , the mass will have no speed and will be at position cm.

First we'll calculate the spring energy, , but first we need
which is given by

Thus we have

Next we need to solve the collision, which is inelastic and the initial velocity of the second mass is 0. Thus we have from conservation of momentum:

This yeilds the value

This gives a kinetic energy of

Thus the total energy is

and then, finally, the amplitude is