# Two masses collide on a ramp [closed] M1 slides down a frictionless ramp and collides with M2 They both compress the spring. How far is the spring compressed? What is the final velocity of M1 on the rebound up the ramp?

I was thinking if its possible to look at the entire system in the center of mass reference frame in order to find the final velocity of m1?

This isn't a homework question.. I have an upcoming physics test and I was trying to figure out different scenarios.

your initial energy of $m_1$ is all potential $m_1gh$, where $h$ is the elevation difference from where $m_1$ at the start to where it will go at the bottom of its travel.
at the bottom the spring will contract by $x$ along the ramp. now you need an angle between the ramp and the vertical, let's say $\theta$. so the initial energy of $m_2$ is also all potential $m_2gx\cos\theta$.
the final energy is all the tension of the spring, because at the bottom point all stops moving: $kx^2/2$. so you get the equation:
$m_1gh+m_2gx\cos\theta=kx^2/2$
all this assuming that when $m_1$ hits $m_2$ they stick together until they reach the bottom. obviously, this isn't happening. if $m_1=m_2$, then $m_1$ will transfer its momentum to $m_2$, which will start moving down, then $m_1$ and $m_2$ will hit again etc. this seems to may have a resonance condition when they'll keep bounding forever, or a stable solution when this all stops. I'm too lazy to solve this part