Principle of virtual work for non-holonomic constraints Goldstein (3rd ed. page 17) derives the principle of virtual work for systems subject to holonomic constraints.
For a system in equilibrium, the force can be decomposed into applied and constraint forces. The net force on the $i^{th}$ particle:
$$\textbf{F}_{i} = \textbf{F}_{i}^{\ (a)} \ +\  \textbf{f}_{\ i}$$
He restricts the discussion to systems where the net virtual work done by constraint forces is zero $$\sum _i\  \textbf{f}_{\ i} \ \cdot \delta\textbf{r}_i = 0$$
This is all fine. But what happens if the constraint is non-holonomic?
For example, suppose the system is just one particle of mass $m$ at rest on a tabletop. It is free to move on and above this tabletop. The constraint force acts in a direction perpendicular to the surface of the table. $\textbf{f} = N \hat{\textbf{z}}$
A conceivable virtual displacement is $\delta \textbf{r} = \delta x \hat{\textbf{x}} + \delta y \hat{\textbf{y}} + \delta z \hat{\textbf{z}}$.
Now $\textbf{f} \cdot \delta \textbf{r} = 0$ is not true and so I cannot claim that $\textbf{F}^{\ (a)} \cdot \delta \textbf{r} = 0$, which is the principle of virtual work.
Question: Is there a weaker version of this principle which accommodates non-holonomic constraints? Can a D'alembert's principle (and, subsequently) Lagrange's equations be derived for such systems?
 A: *

*It is in principle possible to generalize the derivation
$$ \text{D'Alembert's principle}\quad\Rightarrow\quad\text{Lagrange equations} $$
to the case where semi-holonomic constraints are present, cf. e.g. this & this related Phys.SE posts.


*For non-holonomic constraints that are not semi-holonomic, it is probably difficult to make general statements.
A: There is a canonical form for expressing constraints involving, in the case of the single particle, the velocity vector. This is the "differential" version of the constraint. Both holonomic and non-holonomic constraints can be expressed in this standard form: ${\bf f} \cdot {\bf v} + e(t) = 0$. For rheonomic (time-dependent) constraints, $e(t)$ is non-zero. This would be the case if your tabletop had a prescribed up-and-down motion, like an elevator.
In your example, the constraint is $\hat{\bf z} \cdot {\bf v} = 0$. There's a prescription called Lagrange's prescription for the constraint force which goes like ${\bf F}_c = \lambda {\bf f}$, where $\lambda$ is a Lagrange multiplier to be determined by satisfaction of balance laws. In your example, ${\bf F}_c = N \hat{\bf z}$. This approach is in some way equivalent to the principal of virtual work, if instead of using virtual displacements and virtual work, you use virtual velocities and virtual power. This is common in the case of constraints. For example, if a particle is confined to a hemisphere, it would be improper to use a kinematically admissible virtual displacement $\delta {\bf r}$ for it would necessarily take you out of the hemisphere. Maybe you don't have access to an embedding space. Instead, the approach would be to use a virtual velocity belonging to the tangent space.
I should remind you that non-holonomic constraints for a single particle are quite rare and most examples in textbooks are contrived. Non-holonomic constraints are really a rich feature for rigid bodies that are rolling without slip.
For insight on how to incorporate these constraints in a practical way into Lagrange's equations, I would recommend the book Intermediate Dynamics for Engineers by Oliver O'Reilly.
