This is a follow-up to my previous questionprevious question, in which I am now trying to calculate the acceleration of the cart (as before, the block surfaces are frictionless). The mass $m_2$ is attached to $M$ via a frictionless track that keeps it fixed onto the side of $M$ but allows it to move vertically with respect to $M$.
To do this, I first need to find the tension on the string.
I came up with the system of equations:
$$T=m_{1}\left( a-a_{M} \right)$$ $$T-m_{2}\text{g}=-m_{2}a$$
Where the acceleration of $m_1$ is $a - a_M$ (where $a$ is the magnitude of the acceleration of $m_2$) since $ m_1 $ moves right while $M$ moves left. However, is this the right way to approach it — would the accelerations even cancel each other since the surface is frictionless and the movement of $M$ cannot "pull" $m_1$ along?
Also, since the tension created is responsible for the acceleration of the $M + m_2$ system, isn't this equation also valid?: $$T = a_M\left(M + m_2 \right)$$
Clearly the solutions to both are not the same, so one (or possible both) of the above are incorrectly accounting for the forces acting on the mass.
Furthermore, once this tension is found how do you account for the normal force between $M$ and $m_2$ that also affects the acceleration?
Alternatively, is it possible to solve this using conservation of momentum or by using center of mass?