Advanced pH CalculationsPatrick McLaurin 
1 The usual way
We will first review the simplest method for calculating the pH of a solution for a generic weak acid, hydrofluoric acid, HF, at a fairly high concentration.
What is the [H_{3}O^{+}]_{eq} in a 0.100 M solution of HF (aq) at 25^{∘}C?
Using the acid ionization reaction with its associated K_{a} = 6.76 × 10^{−4}:
R  HF (aq)  +  H_{2}O (l)  ⇋  F^{−} (aq)  +  H_{3}O^{+} (aq) 
I  0.100 M     0.0 M   1.00 × 10^{−7} ≈ 0.0 M 
C  −x     +x   +x 
E  0.100 − x     x   x

6.76 × 10^{−5} − 6.76 × 10^{−4} x = x^{2} 
x^{2} − 6.76 × 10^{−5} + 6.76 × 10^{−4} x = 0 
quadratic formula: x =   or −8.567 × 10^{−3} 
Instead of solving this quadratic equation with the quadratic formula, you can iterate. x, how far the reaction needs to go to get to equilibrium, is going to be small because K_{a} is small compared to 0.100 M. If x is very small, x ≈ 0.0, then 0.100  x ≈ 0.100.
Now that we have a good guess for x, plug it in instead of 0.0 for the second iteration:
6.76 × 10^{−4} =  x^{2} 

0.100−8.22 × 10^{−3} 
 
Now that we have a better guess for x, plug it in for the third iteration:
6.76 × 10^{−4} =  x^{2} 

0.100−7.88 × 10^{−3} 
 
Fourth iteration:
6.76 × 10^{−4} =  x^{2} 

0.100−7.89 × 10^{−3} 
 
Now we stop because the x we put in is the same x that was returned; the iterations have converged.
Regardless of the mathematical method used to solve the equation:
[H_{3}O^{+}]_{eq} = x = 7.89 × 10^{−3} M 
This leads to a pH = −log(7.89 × 10^{−3}) = 2.103.
2 Correction to the usual way
We’ll first address the approximation that [H_{3}O^{+}]_{0} = 0.0 M.
We know to assume that [H_{3}O^{+}] is zero at initial ”time" because the weak acids we usually test over in general chemistry are strong enough AND in high enough concentrations to make enough H_{3}O^{+} from acid ionization to dwarf the amount of H_{3}O^{+} from the autoionization of water.
The generic equation used to solve weak acid equilibrium problems is an approximation because we assume [H_{3}O^{+}]_{0} = 0 M:
This is only valid when:

K_{a} is large enough (i.e. the weak acid is strong enough) so that x = [H_{3}O^{+}]_{eq} from the weak acid’s ionization is way larger than that made from water autoionization (i.e. [H_{3}O^{+}]_{0} = 1.00 × 10^{−7} M).
 [HA]_{0} is large enough that the amount of H_{3}O^{+} produced is larger than that made from water autoionization.
Let’s work a problem where K_{a} is very small and with a low acid concentration to see where this approximate equation fails.
What is the pH of 1.00 × 10^{−5} M HCN with K_{a} = 6.2 × 10^{−10}?
Assuming [H_{3}O^{+}]_{0} = 0 M:
The solution is:
pH = −log7.84 × 10^{−8} = 7.10 
This pH makes no sense because HCN is an acid, but at 25^{∘}C, 7.10 is a basic pH.
The amount of H_{3}O^{+} produced from HCN was less than what is produced by the autoionization of water.
A simple fix would be to add the amount of H_{3}O^{+} from the autoionization of water, 1 × 10^{−7} M H_{3}O^{+} to get an approximation:
1.00 × 10^{−7} + 7.84 × 10^{−8} = 1.784 × 10^{−7} 
pH = −log1.784 × 10^{−7} = 6.75 
This pH makes more sense, but it is wrong which we can prove by solving for the K_{a} of HCN.
K_{a} =   [H_{3}O^{+}][CN^{−}] 

[HCN] 
 
 =  (1.784 × 10^{−7})(7.84 × 10^{−8}) 

1 × 10^{−5} − 7.84 × 10^{−8} 
 = 1.41 × 10^{−9} ≠ 6.2 × 10^{−10} 
We really need to not assume [H_{3}O^{+}]_{0} = 0 M in our RICE table.
R  HCN (aq)  +  H_{2}O (l)  ⇋  CN^{−} (aq)  +  H_{3}O^{+} (aq) 
I  1 × 10^{−5}     0   1 × 10^{−7} 
C  −x     +x   +x 
E  1 × 10^{−5} − x     x   1 × 10^{−7} + x 
So the equation to solve is:
(x)(1 × 10^{−7} + x) 

1 × 10^{−5} − x 
 = 6.2 × 10^{−10} 
Written generically:
(x)(1 × 10^{−7} + x) 

[HA]_{0} − x 
 = K_{a} 
If solved by iteration:
x =  6.2 × 10^{−10}(1 × 10^{−5} − x) 

1 × 10^{−7} + x 
 
Starting with x = 0 on the right hand side:
x = 0 
x = 6.20 × 10^{−8} 
x = 3.80 × 10^{−8} 
x = 4.47 × 10^{−8} 
x = 4.26 × 10^{−8} 
x = 4.33 × 10^{−8} 
x = 4.31 × 10^{−8} 
x = 4.31 × 10^{−8} 
Having converged:
[H_{3}O^{+}] = 1 × 10^{−7} + 4.31 × 10^{−8} = 1.43 × 10^{−7} M 
pH = −log1.43 × 10^{−7} = 6.845 
Is this correct? Calculate K_{a}!
K_{a} =   [H_{3}O^{+}][CN^{−}] 

[HCN] 
 
 =  (1.43 × 10^{−7})(4.31 × 10^{−8}) 

1 × 10^{−5} − 4.31 × 10^{−8} 
 = 6.21 × 10^{−10} ≈ 6.2 × 10^{−10} = K_{a} 
But this is still wrong because there must be electric charge balance in the solution. The concentration of positive things (H_{3}O^{+}) must be equal to the concentration of negative things (OH^{−} and CN^{−}).
[OH^{−}] + [CN^{−}] =   + [CN^{−}]_{eq} =  1 × 10^{−14} 

1.43 × 10^{−7} 
 + 4.31 × 10^{−8} = 1.13 × 10^{−7} ≠ 1.43 × 10^{−7} = [H_{3}O^{+}] 
 
As you can see, the concentration of anions is not equal to the concentration of cations.
This issue of charge balance can actually be addressed in how the original problem is solved by treating the two equilibrium problems in tandem (water autoionization and acid ionization).
However, this method is long and often requires the solution of a cubic equation (x^{3} instead of quadratic, x^{2}) which is not trivial, i.e. hard to do.
A quick fix that usually works is to simply average the concentrations of positive with negative things to figure out how they need to meet in the middle; the geometric average seems to align better with the exact solution where the two equilibria are solved simultaneously.
The geometric average is the square root of the product of the two numbers instead of the arithmetic average which is the sum of the two numbers divided by 2.
√  
([OH^{−}]+[CN^{−}])([H_{3}O^{+}]) 

 =  √  
(1.13 × 10^{−7})(1.431 × 10^{−7}) 
 = 1.27 × 10^{−7} 
For what it’s worth, the arithmetic average is 1.28 × 10^{−7}.
[H_{3}O^{+}] = [OH^{−}] + [CN^{−}] = 1.27 × 10^{−7} M 
pH = −log(1.27 × 10^{−7}) = 6.896 
[OH^{−}] =  1 × 10^{−14} 

1.27 × 10^{−7} 
 = 7.87 × 10^{−8} M 
 
[CN^{−}] = 1.27 × 10^{−7} − [OH^{−}] = 1.27 × 10^{−7} − 7.87 × 10^{−8} = 4.83 × 10^{−8} M 
[HCN] = 1 × 10^{−5} − [CN^{−}] = 1 × 10^{−5} − 4.83 × 10^{−8} = 9.95 × 10^{−6} M 
We can also realize how much H_{3}O^{+} came from HCN and how much came from water’s autoionization.
[H_{3}O^{+}]_{HCN} = [CN^{−}] = 4.83 × 10^{−8} M 
[H_{3}O^{+}]_{H2O} = [OH^{−}] = 7.87 × 10^{−8} M 
Curiously, water made more H_{3}O^{+} that HCN.
These relationships are true because of the demands of charge balance!
We can see that the autoionization of water was suppressed by the acid’s generation of H_{3}O^{+} because 7.87 × 10^{−8} < 1 × 10^{−7}.
Let’s check our K_{a} to make sure everything is still okay.
K_{a} =   [H_{3}O^{+}][CN^{−}] 

[HCN] 
 
 =  (1.27 × 10^{−7})(4.83 × 10^{−8}) 

9.95 × 10^{−6} 
 = 6.17 × 10^{−10} ≈ 6.2 × 10^{−10} = K_{a} 
Looks like we are good to go.
It is important to note that you cannot use the simpler equilibrium expression (i.e. ignore autoionization), add the autoionization after the fact (+1 × 10^{−7}), and then simply make the charge balance correction as this will lead to an H_{3}O^{+} concentration that is too high and you would not recover the correct K_{a} value.
Were you to do this bad thing, [H_{3}O^{+}] = 1.549 × 10^{−7} M and K_{a} = 1.41 × 10^{−09} ≠ 6.2 × 10^{−10} = K_{a}, so it’s obviously wrong.
Lastly, there is even more work to be done because this work ignores thermodynamic activities. Oh well.
This document was translated from L^{A}T_{E}X by
H^{E}V^{E}A.