There's this problem in Goldstein's (Classical Mechanics) derivations section:
5. Two wheels of radius $a$ are mounted on the ends of a common axle of length $b$ such that the wheels rotate independently. The whole combination rolls without slipping on a plane. Show that there are two nonholonomic equations of constraint,
$$\begin{align} \cos\theta dx + \sin\theta dy &= 0 \\ \sin\theta dx - \cos\theta dy &= \frac{1}{2}a(d\phi + d\phi'), \end{align}$$
(where $\theta$, $\phi$, and $\phi'$ have meanings similar to those in the problem of a single vertical disk, and $(x,y)$ are the coordinates of a point on the axle midway between the two wheels) and one holonomic equation of constraint,
$$\theta = C - \frac{a}{b}(\phi - \phi'),$$
where $C$ is a constant.
And here's the image from the problem with a single vertical disk:
Now, I believe I have successfully derived the equations for two of those constraints, but I'll write it anyway, in case my reasoning is somehow wrong or too sloppy. (I use the labels $1$ and $2$ for the wheels, instead of unprimed and primed.)
$$\dot{x} = v \sin{\theta}$$
$$\dot{y} = -v \cos{\theta}$$ $$\implies \color{red}{\cos{\theta} \, dx + \sin{\theta} \, dy = 0}$$ And the second one: By rotating the wheels about the midpoint $(x,y)$, the angle $\theta$ changes such that $$d \theta = \frac{2}{b} \, dl$$ where $dl$ is the length of the arc swept by both wheels, satisfying $$dl = v_1 \, dt = - v_2 \, dt$$ because the wheels turn with anti-parallel velocities. $$ dl = v_1 \, dt = a \frac{d \phi_1}{dt} \, dt = a \, d\phi_1$$ $$ dl = -v_2 \, dt = -a \frac{d \phi_2}{dt} \, dt = -a \, d\phi_2$$ $$\implies \color{red}{d\theta = -\frac{a}{b} (d \phi_1 - d \phi_2) },$$ which implies the holonomic constraint equation, with flipped signs. (I guess I just picked different labels, right?)
How can I get the last one? I don't have much experience with these sorts of problems, so I was wondering, is there a systematic way to approach them or is it always just hacking at the problem, hoping to pull out the constraint equations?
P.S. My question got edited because of policy reasons according to which I cannot ask some questions, so I would like to say that I don't want to know if my reasoning is correct for the derivation of first two constraints. :)
EDIT, PLEASE READ: Although I answered my own question regarding the specific problem mentioned here, if anyone provides a good answer regarding a systematic way to derive constraint equations, I will accept that answer instead.