Riccati equation and the problem of decoherence