Solution
This is a standard conservative system with two degrees of freedom. Take as generalised coordinates \( x \), the displacement of the wedge from a fixed point on the floor, and \( y \), the displacement of the block from a fixed point on the wedge. The calculation of the kinetic and potential energies in terms of \( x, y \) is performed exactly as in Chapter 9 and gives
\[
\begin{array}{l}
T=\frac{1}{2} M \dot{x}^{2}+\frac{1}{2} m\left(\dot{x}^{2}+\dot{y}^{2}+2 \dot{x} \dot{y} \cos \alpha\right) . \\
V=-m g y \sin \alpha .
\end{array}
\]
The required partial derivatives of \( T \) and \( V \) are then given by
\[
\begin{array}{lll}
\frac{\partial T}{\partial x}=0, & \frac{\partial T}{\partial \dot{x}}=(M+m) \dot{x}+(m \cos \alpha) \dot{y}, & \frac{\partial V}{\partial x}=0 . \\
\frac{\partial T}{\partial y}=0, & \frac{\partial T}{\partial \dot{y}}=(m \cos \alpha) \dot{x}+m \dot{y}, & \frac{\partial V}{\partial y}=-m g \sin \alpha
\end{array}
\]
We can now form up the Lagrange equations. The equation corresponding to the coordinate \( x \) is
\[
\frac{d}{d t}[(M+m) \dot{x}+(m \cos \alpha) \dot{y}]-0=0,
\]
and the equation corresponding to the coordinate \( y \) is
\[
\frac{d}{d t}[(m \cos \alpha) \dot{x}+m \dot{y}]-0=m g \sin \alpha .
\]
If we now perform the time derivatives in equations (12.18), (12.19) and solve for the unknowns \( \vec{x}, \vec{y} \) we obtain
\[
\ddot{x}=-\frac{m g \sin \alpha \cos \alpha}{M+m \sin ^{2} \alpha}, \quad \ddot{y}=\frac{(M+m) g \sin \alpha}{M+m \sin ^{2} \alpha},
\]
which are the required accelerations. They are both constant.