  We address the problem of two interacting atoms of different species inside a
cavity and find the explicit solutions of the corresponding eigenvalues and
eigenfunctions using a new invariant. This model encompasses various commonly
used models. By way of example we obtain closed expressions for concurrence and
purity as a function of time for the case where the cavity is prepared in a
number state. We discuss the behaviour of these quantities and and their
relative behaviour in the concurrence-purity plane.
