Solution (source code)

= Solution

The <eigenvalues> found in part (ii) give the <purity of a density operator>
$$
\gamma_A=(1-g^2)^2+g^4+O(g^3)
=1-2g^2+O(g^3)
=1-\frac{\lambda^2}{8\omega^4}+O(\lambda^3).
$$
The displayed truncation lies between zero and one when $|\lambda|\leq2\sqrt2\,\omega^2$. Perturbation theory requires the stronger condition $|\lambda|\ll\omega^2$; the exact coupled oscillator is stable only for $|\lambda|<\omega^2$. The reduction in purity records entanglement between $A$ and $B$.