Calculating the concentration of a weak acid