A mass hanging under a table: a problem from Goldstein I'm trying to solve Problem 1.19 from Goldstein's Chapter 1 (2nd edition), and am getting bogged down in trigonometry (?). Please help me figure out what I'm doing wrong!

Two mass points of mass $m_1$ and $m_2$ are connected by a string passing through a hole in a smooth table so that $m_1$ rests on the table and $m_2$ hangs suspended. Assuming $m_2$ moves only in a vertical line, what are the generalized coordinates for the system? Write down the Lagrange equations for the system and, if possible, discuss the physical signiﬁcance any of them might have. Reduce the problem to a single second—order differential equation and obtain a ﬁrst integral of the equation. What is its physical signiﬁcance? (Consider the motion only so long as neither $m_1$ nor $m_2$ passes through the hole). 

I'm trying to find the Lagrangian as rigorously as I can. It seems that the intent of the problem is to establish the constant length of the rope as a constraint and the tension forces on both points as forces of constraint that can be disregarded when drawing up the Lagrangian. But I'm unable to prove that I can disregard them.
Let the origin be at the hole, and $\mathbf{r}_1$,$\mathbf{r}_2$ be the position vectors of the two points. I assume as known that the tension $T$ is equal at both ends of the rope. Then if the polar angle of the first point is $\phi$, the force of tension on the first point is $(F_{1x},F_{1y}) = (-T\cos\phi,-T\sin\phi)$ and on the second point $F_{2z} = -T$, listing only nontrivial coordinates. The holonomic equation of constraint is $|\mathbf{r}|_1+|\mathbf{r}_2| = R$ where $R$ is the constant length of the rope.
Now clearly the tension forces are not like the normal force of constraint from the table on the first point, that just straight out vanishes because it's orthogonal to velocity. The tension forces do nonzero virtual work on each particle, but it seems that I should be able to prove that just as with a rigid body, due to Newton's 3rd law they vanish when summed up over the particles. In other words, I must prove that the d'Alambert principle holds in the system: the net virtual work of the forces of constraint is zero. 
Let $\delta\mathbf{r_1} = (\delta r_1,\psi)$ (in polar coordinates) and $\delta\mathbf{r_2} = \delta r_2$ be virtual displacements of the two points consistent with the constraints. The total virtual work of the two forces of constraint is then $$-T\cos\phi(\delta r_1\cos\psi)-T\sin\phi(\delta r_1\sin\psi)-T\delta r_2 = T\delta r_1\cos(\phi-\psi) + T\delta r_2 = 0$$
and I must show that this holds if $(\delta\mathbf{r_1},\delta\mathbf{r_2})$ satisfy the equation of constraint, meaning the differences in length between the position vectors must match: $$|\mathbf{r_1}+\delta r_1|-|\mathbf{r_1}| = -(|\mathbf{r_2}+\delta r_2|-|\mathbf{r_2}|)$$
The right side is just the scalar $-\delta r_2$, but the left side doesn't simplify that easily. Using the polar coordinates $(r,\phi)$ it seems to come down to
$$\sqrt{(r\cos\phi+\delta r_1\cos\psi)^2+(r\sin\phi+\delta r_1\sin\psi)^2}-r = \sqrt{r^2+\delta r_1^2 + 2r\delta r_1\cos(\phi-\psi)}-r
$$
and now I'm stuck. It seems that I need to prove $-\delta r_2 = \delta r_1\cos(\phi-\psi)$, for the forces to do zero virtual work together. In the special case $\psi=\phi$, when the first point moves in a straight line towards the origin, the square root above simplifies, $r$ vanishes, and I get the desired $\delta r_1 = -\delta r_2$. But I don't see how I can assume that, and in fact it seems physically incorrect if for example the first point has initial velocity in the $y$ direction.
What am I doing/calculating/assuming wrong?
 A: I'm going to answer my own question.
The key mistake I made was in not understanding the nature of virtual displacements. When virtual displacements are defined they're usually said to be "consistent with the constraints", and I now think that this phrase is very easy to misunderstand. The way I misunderstand it in my question is when I wrote

and I must show that this holds if $(\delta\mathbf{r_1},\delta\mathbf{r_2})$ satisfy the equation of constraint, meaning the differences in length between the position vectors must match: $$|\mathbf{r_1}+\delta r_1|-|\mathbf{r_1}| = -(|\mathbf{r_2}+\delta r_2|-|\mathbf{r_2}|)$$

The key mistake is in imagining that after being moved by a virtual displacement, the position vectors of the particles must still satisfy the constraint equation. This is wrong. Virtual displacements do not in general leave the system still satisfying the constraints, as a naive reading of "consistent with constraints" would suggest. 
A simple illuminating example is a single particle constrained to move on the surface of a sphere. If we consider a virtual displacement of the particle at any given position $\mathbf{r}$, it is not a vector $\delta\mathbf{r}$ such that $\mathbf{r}+\delta\mathbf{r}$ is still on the sphere! No, it is a vector $\delta\mathbf{r}$ lying in the plane tangent to the sphere at point $\mathbf{r}$, so that $\mathbf{r}+\delta\mathbf{r}$ is definitely off the sphere!
The correct way to calculate restrictions on virtual displacements is as follows. For each holonomic equation of constraint of the form $f(\mathbf{r}_1,...,\mathbf{r}_n,t)=0$, the virtual displacements $\delta\mathbf{r}_1,...\delta\mathbf{r}_n$ are restricted by the equation $$\nabla_{r_1}f\cdot\delta\mathbf{r}_1+...+\nabla_{r_n}f\cdot\delta\mathbf{r}_n=0$$
(and not at all by the compleletely wrong equation $f(\mathbf{r}_1+\delta\mathbf{r}_1,...,\mathbf{r}_n+\delta\mathbf{r}_n,t)=0$ I was trying to use in my post).
I will now correct the analysis in my post and show that indeed the forces of constraint do zero virtual work. The holonomic equation of constraint is
$$f(\mathbf{r}_1,\mathbf{r}_2) = |\mathbf{r}_1|+|\mathbf{r}_2| -R = 0$$
Let's denote by $x_1,y_1$ the $x,y$ coordinates of the first particle and by $z_2$ (always negative) the $z$-coordinate of the second particle. Then, ignoring the always-vanishing coordinates, we have:
$$r_1=|\mathbf{r_1}|=\sqrt{x_1^2+y_1^2}, r_2=|\mathbf{r_2}|=-z_2$$
$$f = \sqrt{x_1^2+y_1^2}-z_2-R=0$$
$$\nabla_{r_1}f = \left(\frac{\partial{f}}{\partial{x_1}},\frac{\partial{f}}{\partial{y_1}}\right)= \left(\frac{x_1}{r_1},\frac{y_1}{r_1}\right)$$
$$\nabla_{r_2}f = \frac{\partial{f}}{\partial{z_2}} = -1$$
And the virtual displacements $\delta\mathbf{r}_1=(\delta x_1,\delta y_1), \delta\mathbf{r}_2=\delta z_2$ must satisfy
$$\left(\frac{x_1}{r_1},\frac{y_1}{r_1}\right)\cdot(\delta x_1,\delta y_1) + (-1)\delta z_2 = 0$$
or, back to vectors
$$\frac{\mathbf{r}_1\cdot\delta\mathbf{r}_1}{r_1} = \delta z_2$$
But since $\mathbf{r}_1\cdot\delta\mathbf{r}_1 = r_1 \delta r_1 \cos(\phi-\psi)$, where $\phi-\psi$ is precisely the angle between the vectors $\mathbf{r}_1,\delta\mathbf{r}_1$ considered in the post, we arrive at the relation we need to show that the forces of constraint do zero virtual work, as shown in the post: $-\delta r_2 = \delta r_1\cos(\phi-\psi)$ (up to a sign flip I made somewhere, no doubt due to the unfortunate choice of the negative $z$ direction).
