D'Alembert's principle : static equilibrium of two inclined rods in frictionless rectangular well Two rods of length $2a$, masses $M$ and $m$, are in static equilibrium inside a
rectangular well of dimensions $a \times 2a$. What are the equations that fix $\phi$ and $\psi$? (One has a "mechanical" origin and the other is "geometrical").
(Solve the problem using D'Alembert's principle and prove the result using Newtonian mechanics).

 A: I believe you will want to define a coordinate x which is the displacement from the center of the well of the place where the bars come together.  Then imagine virtual changes in x, call it dx, and the virtual rotations of the bars, dphi and dtheta, that is needed to keep them touching the corners of the well.  Those angles will depend on dx.  Then find the x such that dx changes produce zero net work by the forces from the walls.  There is both translational and rotational work there, so include both.  The forces at the center are vertical, the forces at the corners are perpendicular to the bar it touches.  Ask yourself if gravity will do either type of work in this problem, and the answer to that should tell you if the equilibrium point depends on the strength of the gravity.
A: The physical constraints on angles $\psi$ and $\phi$ are the usual conditions for static equilibrium : viz. that the net forces and torques on each body are zero. The geometrical constraint is derived from the shape of the well :
$a\cot\psi+a\cot\phi=2a$
$\cot\psi+\cot\phi=2$...(1)  
Solution using Newtonian Mechanics
Consider the equilibrium of each rod separately. There is no friction so all contact forces are normal. Suppose that the reaction at the lip is $P$ (normal to the rod), the normal reaction at the floor is $Q$ and the (horizontal) reaction between the rods is $R$. Balance forces vertically and horizontally, and take moments about the lip :
$P\cos\phi+Q=W$
$R=P\sin\phi$
$Ra+W(a\cot\phi-a\cos\phi)=Qa\cot\phi$.
Eliminate $P$ and $Q$ to obtain :
$R=W\sin^2\phi\cos\phi$...(2)  
Here $W$ is the weight of the rod. The reactions $R$ between the 2 rods are equal and opposite, so
$M\sin^2\psi\cos\psi=m\sin^2\phi\cos\phi$...(3)
This can be combined with the geometrical constraint (1) to find specific values of $\psi$ and $\phi$ for the given ratio $M/m$.   
Solution using D'Alembert's Principle of Virtual Work
Suppose the point of contact between the rods is moved a small distance to the right. This raises the CM of the RH rod and lowers the CM of the LH rod. According to D'Alembert's Principle, the net work done is zero if the rods are in equilibrium.
Suppose the move increases the inclination of the RH rod by $d\phi$ and decreases that of the LHS rod by $d\psi$. The height of the CM of the RH rod is $a\sin\phi$ and increases by $a\cos\phi d\phi$, while that of the LH rod decreases by $a\cos\psi d\psi$. Apply D'Alembert's Principle :
$mga\cos\phi d\phi = Mga\cos\psi d\psi$
$m\cos\phi d\phi = M\cos\psi d\psi$...(4)
Differentiate the geometrical constraint (1) :
$-\frac{d\psi}{\sin^2\psi}-\frac{d\phi}{\sin^2 \phi}=0$.
Insert this into eqn (4) to get eqn (3) in the Newtonian Mechanics solution.
