Solution (source code)

= Solution

Because $\widetilde{\mathbf n}\mathbin\cdot
(\widetilde{\mathbf n}\times\partial_t\widetilde{\mathbf n})=0$, the component of $\mathbf q$ parallel to $\widetilde{\mathbf n}$ is $-\mathbf B\mathbin\cdot\widetilde{\mathbf n}$. The <Gaussian integral> over $\lambda$ removes precisely this longitudinal component. Thus
$$
\mathcal L_{eff}
=-\frac{JS^2}{2}|\nabla\widetilde{\mathbf n}|^2
+\frac1{16Ja^2}
\left|
\widetilde{\mathbf n}\times\partial_t\widetilde{\mathbf n}
-\mathbf B+(\mathbf B\mathbin\cdot\widetilde{\mathbf n})
\widetilde{\mathbf n}
\right|^2.
$$
Using the <vector triple product>[vector triple-product identity] and $|\widetilde{\mathbf n}|=1$, this becomes the $O(3)$ <nonlinear sigma model> in a background field:
$$
\boxed{
I_{eff}[\widetilde{\mathbf n}]
=\int dt\,d^2x\left[
-\frac{JS^2}{2}|\nabla\widetilde{\mathbf n}|^2
+\frac1{16Ja^2}
|\partial_t\widetilde{\mathbf n}
-\mathbf B\times\widetilde{\mathbf n}|^2
\right].}
$$
The magnetic field acts as the temporal component of an $O(3)$ background gauge connection.