Need some clarification with d'alembert's principle
I've been working on Caiken book trying to get my head around D'alembert's principle before I move onto the langrange equations. Most of it I kind of get but here are two solutions (attached) I got wrong and not sure why.
Now with problem 2.03 I got one sign wrong for the denominator and I ended up with $\displaystyle (m_1m_2)g \delta x  (m_1m_2)\ddot{x}\delta x =
0$
$\displaystyle \ddot{x} = \frac{m_1m_2}{m_1m_2}g$
so clearly I got the sign wrong but not sure why. Shouldn't one mass be accelerating in the opposite direction to the other? Why are they both added for the denominator?
For problem 2.04 I got $\displaystyle (m_1\frac{1}{2}m_2)g \delta x  (m_1\frac{1}{2}m_2)\ddot{x}\delta x = 0$ but the book answer has 1/4 for the second expression but why?
Thanks in advance for helping clarify what I've done wrong here.
