Solubility and pH Calculations, The Mathematics of the Simplest Ionic Equilibria