An analytical approach to transient homovalent cation exchange problems