Conservation of momentum for moving inclined plane 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?
 A: As a suggestion I would make the $z-$axis, or $y-$axis if you wish, to point downwards because you know that the acceleration is downwards and this will remove a number of negative signs from your equations.

Rather than using subscripts calling $X$ the acceleration of the wedge and $x$ and $z$ the acceleration of the block you can write down three Newton's second law equations for the block and the wedge.
But you need a fourth equation and that comes from the geometry of the system.  I think that this is what you are missing?
The block keeps in contact with the wedge and slides down at an angle $\alpha$.
The acceleration of the block relative to the wedge is $z$ downwards and $x-X$ in the positive horizontal direction.
This will give you a connection between $\alpha$, $z$ and $x$.
A: hint : if you put pseudo force on the block then, the block comes at rest with respect to wedge now, you know the direction of acceleration which is along the wedge I.e. at alpha with horizontal. resolve normal for wedge as normal component does not cause acceleration and solve simple algebraic equations formed. using centre of mass and taking proper components of net accelerations wrt ground for wedge and block will give relationship between the 2 accelerations.
