How would one build an RF cavity? How does an RF cavity, such as the RF cavities in the LHC, work mechanically and mathematically? How would one build an RF cavity? What equations govern the speed of a charged particle in an RF cavity?
 A: An RF cavity is just a resonator where the Electro-Magnetic field can oscillate. Physicists and engineers typically design those so that the fundamental mode (the stronger one) has a longitudinal component of the electric field that can accelerate the beam. This is a matter of solving the Maxwell equations with complex boundary conditions. There are many computer codes that allow to do that.
So you got your design and now you have to build the piece. If you have seen an RF cavity you know that the shape is pretty peculiar, especially in case of multiple cells. Moreover you have quite strict tolerances on the both on the shaping and on the imperfections, to avoid degrading the performances and/or cause discharges.
The typical way to obtain the final cavity is stamping many pieces (typically one for each half cell) and braze them together. Electron Beam Welding is pretty much common these days as it allows to get a very clean weld. The final steps consist of polishing and eventually coating to improve the characteristics of the surface.
There are new ideas that points to rule out the welding, such as spinning, hydro-forming, explosive forming (see here) but welding is still the most common technique.
As for your last question, the one on particle dynamics, there are basically two equations involved: the Newton equation $\vec{F}=m*\vec{a}$ (eventually in the relativistic formulation) and the Lorentz force: $\vec{F}=q(\vec{E} + \vec{v} \times \vec{B}$). The solution is not trivial since the field is not constant nor in time, nor in space, but again, computers help a lot.
