Analytic solution of the two-state problem.