I'm confused about the conservation of momentum in problems involving inclined planes that moves. Consider an inclined plane free to move on the floor and a body on the edge, there is no friction at all. Calculate the accelerations of the body and the inclined plane with respect to the floor.
So I considered the fact that, on the $x$ axis momentum is conserved, which means
$m \dot{x} +M \dot {X}=0$
And then
$m \ddot{x} +M \ddot {X}=0$ (1)
Since there is relative motion is possible to write
$\ddot{x}= a_{relative_x} + \ddot {X}$ (2)
The problem is about $a_{relative_x}$, I think that is
$a_{relative_x}=-mg sin(\alpha) cos(\alpha)$
But using equation (1) and (2) I get
$\ddot{X}=\frac{g sin(\alpha) cos(\alpha) m }{M+m}$
While the answer is $\ddot{X}=\frac{g sin(\alpha) cos(\alpha) m }{M+m sin^2(\alpha)}$
Further more, as long as $\ddot{y}$ is concerned, I thought that is should not be influenced at all by the motion of the inclined plane, i.e.
$\ddot{y}=-mg sin(\alpha) sin(\alpha)$, but the answer is
$\ddot{y}=\frac{-(m+M) Sin^2(\alpha) g }{M+mSin^2(\alpha) }$
Is this the right way to use the conservation of momentum?