I have reconstructed eqn 11.16 for a complex process.
Assume first, that the system contains citric acid and sodium hydroxide at a pH of 7.5, and the concentration of citric acid is 0.0268M. Using this equation, it is relatively easy to show that the concentration of sodium hydroxide must be 0.0799M, which makes sense, because it is about 3 times the amount of citric acid in the solution, and, to a zeroeth approximation, all the citric acid is ionized. I should state here, that this setup doesn't really care if the pH is 7.5 or 7.9, so relative activities are probably not important. The purpose of this step is to merely derive some number for the concentration of sodium hydroxide. The equation that I used, written in LaTeX is here:
$$
\frac{C_a\sum_{i=1}^n i K_{ai} [H^+]^{n-i}}{[H^+]^n+\sum_{i=1}^nK_{ai}[H^+]^{n-i}} +
\frac{K_w}{[H^+]} =
\frac{K_bC_b[H^+]}{K_w+K_b[H^+]} + [H^+]
$$
To calculate this C_b, I use K_ai = [4.07e-07; 1.7378e-05; 7.413102e-04] and K_b=0.63096. [H^+] is calculated in the usual way, using 10^{-7.5} for this condition.
Next, hydrogen sulfide is bubbled through the solution so that the solution attains a pH of 6.8. How much hydrogen sulfide is ionized in the solution? To do this, I regenerated eqn 11.16 for three species, the base (NaOH), the acid (citric acid) and the other acid (hydrogen sulfide.) Here is a LaTeX form for this equation:
$$
\frac{C_a\sum_{i=1}^n i K_{ai} [H^+]^{n-i}}{[H^+]^n+\sum_{i=1}^nK_{ai}[H^+]^{n-i}} +
\frac{K_w}{[H^+]} +
\frac{C_c\sum_{i=1}^m i K_{ci} [H^+]^{m-1}}{[H^+]^m+\sum_{i=1}^mK_{ci}[H^+]^{m-i}} =
\frac{K_bC_b[H^+]}{K_w+K_b[H^+]} + [H^+]
$$
Please see the attached file to view the equations. The file term.m is an octave file to calculate the complex sum term. (Well, I tried to attach this but it was rejected, it is appended below.)
In this equation, I use K_ci=[1.096478e-12; 9.120184e-08] and solved for C_c = 3.94e-09.
Is this correct? Is my approach correct? This seems surprisingly small.
Please comment and critique my approach to ths question. Thank you.
Here is the term.m file:
$$ usage:
$$ term(c,k,ph)
$$
$$ Calculates the sum term where hi = 10^(-ph),
$$ the concentration of the chemical is c,
$$ and the Ka of each ionization is in k
$$ k must be an ordered row vector, where
$$ k(1) is for the first ionization,
$$ k(2) is for the second ionization, etc.
$$ Created: March 2011
$$ Version: 0.1
$$ Keywords: pKa
function res = term(c,k,ph)
n = rows(k)
s1 = 0.0
s2 = 0.0
h = 10**(-ph)
for i = 1:n
s1 = s1 + k(i) * (h**n-i)
s2 = s2 + i * k(i) * (h**n-i)
endfor
res = (c*s2)/((h**n)+s1)
endfunction