  The M{\o}lmer-S{\o}rensen gate is a widely used entangling gate for ion
platforms with inherent robustness to trap heating. The gate performance is
limited by coherent errors, arising from the Lamb-Dicke (LD) approximation and
sideband errors. Here, we provide explicit analytical formulas for errors up to
fourth order in the LD parameter, by using the Magnus expansion to match
numerical precision. We show that fourth order Magnus expansion terms are
unavoidable, being in fact leading order in LD, and are therefore critical to
include for typical target gate fidelities. We show how these errors can be
partially compensated using analytical renormalization of the drive strength,
by calibration of the Lamb-Dicke parameter, and by the use of smooth pulse
shaping.
