I am looking at this problem in Morin’s *Introduction to classical mechanics*:

**6.1. Moving plane** A block of mass $m$ is held motionless on a frictionless plane of mass $M$ and angle of

inclination $θ$ (see Fig. 6.8). The plane rests on a frictionless horizontal surface. The

block is released. What is the horizontal acceleration of the plane?

Here is the more detailed diagram associated with the solution:

The proposed solution sets out the Lagrangian in terms of the kinetic energy

$$

K=frac12Mdot q_1^2 + frac12 m ((dot q_1 + dot q_2)^2tan^2(theta) + dot q_2^2)

$$

and gravitational potential

$$

V=-mg(q_1+q_2)tan(theta)

$$

where I have replaced $x_i$ in the diagram with $q_i$.

This yields the Lagrangian

$$

L=K-V=frac12Mdot q_1^2 + frac12 m ((dot q_1 + dot q_2)^2tan^2(theta) + dot q_2^2)+mg(q_1+q_2)tan(theta)

$$

which, when processed with the Euler-Lagrange equations gives a solution (‘after a little simplification’)

$$

ddot q_1=frac{mgsin(theta)cos(theta)}{M+msin^2(theta)}

$$

(I did my best to process it with Sympy in python and got that solution as

$$

ddot q_1=frac{mgtan(theta)}{M tan^2(theta) + M + mtan^2(theta)}

$$

If you can see why the Sympy answer is equivalent let me know, but I will not be surprised if I typo’d something. I’m content to take the book’s solution as a given.)

To crosscheck things I also wanted to apply the Hamiltonian procedure, and so after replacing the $dot q_1=frac{p_1}{M}$ and $dot q_2=frac{p_2}{m}$

I had the Hamiltonian

$$

H=K+V=-mg(q_1 + q_2)tan(theta) + frac12 m ((p_2/m + p_1/M)^2tan^2(theta) + p_2^2/m^2) + frac12 p_1^2/M

$$

But processing this with Hamilton’s equation $dot p=-frac{partial H}{partial q}$

I think that should mean that $frac{ddot q_1}{M}=dot p_1=mgtan(theta)$ which (I think?) is not the same as the one suggested in the solution in the book. (It looks like the acceleration one would expect if the wedge were held fixed, anyhow, but I think that’s not what we should expect here.)

So at the moment (no pun intended) I’m stumped as to what I’m doing wrong. Can I not use the time derivative of the momentum to check the acceleration like this?