Solution (source code)

= Solution

The bulk potential gives fluctuations in $\lambda$ a nonzero restoring force, whereas slowly rotating the <nematic director> costs only gradients. At lengths much larger than the amplitude correlation length, it is therefore the leading <gradient expansion> approximation to set $\lambda=\lambda_0$ while retaining $\mathbf n(\mathbf r)$.

Differentiating
$$
Q_{ij}=2\lambda_0\left(n_in_j-\frac12\delta_{ij}\right)
$$
gives
$$
\nabla_iQ_{ij}
=2\lambda_0\left[(\nabla\mathbin\cdot\mathbf n)n_j
+(\mathbf n\mathbin\cdot\nabla)n_j\right].
$$
Substitution into the elastic term yields
$$
\boxed{\mathbb F_{\rm elastic}
=2K\lambda_0^2
\left|(\nabla\mathbin\cdot\mathbf n)\mathbf n
+(\mathbf n\mathbin\cdot\nabla)\mathbf n\right|^2.}
$$