Figure 1 shows pH as a function of concentration, for various pKa values, including weak acids and strong acids, as well as intermediate-strength acids, which are particularly interesting.
The pKa values for some common acids and bases are tabulated in reference 1 and reference 2. In this document, we consider only monoprotic acids.
These curves have a number of interesting properties:
For an explanation of the notation used here, see reference 3 or reference 4.
If we express same relationship in terms of concentration (rather than log concentration) we get:
To say the same thing in other words: It is interesting that over the whole range from pKa = 0 to pKa = 5 or 6, the acid follows the weak-acid rule at high concentration, but then follows the strong-acid rule at moderately low concentration.
The meaning of equation 3 is clear: it just says that all the acid molecules are ionized (and that auto-ionization of the water molecules is negligible). This is what we expect for a reasonably concentrated strong acid ... and it also makes sense for a moderately-dilute moderately-weak acid. Simple entropy considerations suggest that greater dilution favors greater ionization.
It is also interesting to see how much of the acid is ionized. This is shown in figure 2.
If we know [H+], we can find [A−] relatively easily. (Hint: combine equation 12 and equation 14.)
so the ionization percentage is:
Equation 6b is a tight bound for a dilute solution of a very weak acid (pKa = 7 or higher). The pH of the solution will never be less than the pH of water, so it’s clear the acid will never be 100% ionized, even when it very dilute. For example, if the pKa is 9, it will approach 1% ionization when it is very dilute.
Remark: This can be nicely explained as a common-ion effect.
It is easy to find references that assert that any acid, no matter how weak, will be 100% ionized if it’s dilute enough. And it’s easy to see why people would make that mistake. In a vacuum, anything will dissociate if it’s dilute enough. As a famous example, hydrogen atoms in thermal equilibrium at 4 kelvin in outer space are ionized, simply because there is so much phase space for the particles to wander around in. Saha equation.
In contrast, our beaker of acid is not a vacuum. The presence of water guarantees that the H+ concentration never drops below 10−7 no matter how dilute the acid is. Those H+ ions push the equilibrium to favor the unionized HA molecule.
The common-ion effect is commonly expressed as a “solubility” issue, but really it’s an ionization issue. The distinction is important if the unionized species is reasonably soluble. A good example is boric acid, pKa = 9.5.
Equation 6b is also a tight bound for a sufficiently concentrated solution of a weak acid, even if it’s not very weak. In such cases we have:
The amount of unionized acid is:
so the percentage is:
We can do the same for the amount of unionized acid:
The curves in figure 1 were computed by solving the following equation. It is a cubic polynomial, with one positive root and two negative roots. The positive root is the only one that makes sense as a concentration.
This can be considered a simplified version of equation 34, applicable when there are no other acids or bases in the system.
As a check on the algebra, you can set Ka=0 in equation 10, in which case [H+] = √Kw as it should.
It is easy to solve equation 10 with an iterative root-finding algorithm. I’ve had good luck with the Brent algorithm (reference 5).
In contrast, beware that standard “algebraic” formulas for solving the cubic can give wrong answers in some cases. Depending on details of the implementation, the formulas can be numerically unstable. That is to say, the result gets trashed by roundoff errors. Specifically: I tried using the standard library routine gsl_poly_complex_solve_cubic() and it failed spectacularly for certain values of pKa and pCha. Some of the alleged results were off by multiple orders of magnitude. Some of the alleged results were complex numbers, even though the right answers were real numbers. It might be possible to rewrite the code to make it behave better, but that’s not a job I’m eager to do.
Lesson #1: Something that looks like an “exact” closed-form solution might not be at all suitable for real-world numerical calculation ... whereas an approximate, iterative solution might be highly accurate in practice.
Lesson #2: The failure of the algebraic method serves as a reminder of the difference between uncertainty and significance. The inputs to the method might or might not be uncertain; it doesn’t actually matter. The output (i.e. the root as plotted in figure 1) has a tolerance of a few percent. The internal calculations use IEEE double-precision floating point, which is good to about 16 decimal digits ... which is not enough for the task at hand. Even though the tolerance allows uncertainty in the second digit, there is significance in the 16th digit and beyond. So, if you see a number of the form:
you should not assume it is safe to round things off. In this case, such a number already has too few digits. For more on this, see reference 6.
The C++ code to calculate the pH as a function of concentration can be found in reference 7.
Here is a quick summary of the starting point and the ending point. We postpone to section 4.2 the details of the intermediate steps. For an explanation of the notation used here, see reference 3 or reference 4.
For starters, we need the definition of the acid dissociation constant:
and similarly the water dissociation constant:
We also need the conservation laws, including conservation of A-groups in our weak acid:
as well as conservation of charge:
That gives us four equations in four unknowns. Turning the crank on the algebra gives us
which is the same as equation 10.
Let’s create something that might serve as a buffer solution. We start with the weak acid considered in section 4.1, and also add a certain amount of very strong base (EOH!). The buffer doesn’t require it, but let’s also add a certain amount of very strong acid (H@!).
As in equation 12 the acid dissociation constant is:
As in equation 13 the water dissociation constant is:
As a slight generalization of equation 14, the A-groups coming from our weak acid are conserved:
At this point, we add a new equation, stating that the E-groups coming from the strong base are conserved:
Similarly the @-groups coming from the strong acid are conserved:
Since we are assuming the strong base and strong acid are very strong, we can immediately simplify the three previous equations to:
Charge is conserved. This is like equation 15, except that now we have to include the strong base and the optional strong acid:
where σ is the net charge floating around from the strong base and/or acid:
Now we turn the crank. We start by plugging into equation 17, using equation 22 to eliminate the unknown [HA] from the system of equations.
That gives us
We now plug into the charge-conservation expression, equation 26, using equation 23, equation 30, and equation 18 to get rid of all the unknowns. That gives us
Multiplying through by [H+] gives us
Multiplying through by the remaining denominator gives us:
Note that this introduces a spurious root at [H+] = − Ka whenever Ka and/or Cha is zero. Knowing this will be useful in a moment.
The equation can be rearranged to give the “usual” result:
The product of the roots is positive, and we know one root is negative, so the other two must have opposite signs. Therefore overall there is one positive root and two negative roots.
By setting (Ceoh! − Ch@!) to zero we obtain equation 10, so you can see why we didn’t bother deriving it directly; it is easier to do the more-general case and specialize to (Ceoh!−Ch@!)=0 later.
As a check on the algebra, you can set Ka=0, in which case equation 34 simplifies to:
Let’s check what this says about a strongly acidic solution. That means (Ceoh! − Ch@!) is large and negative. Therefore [H+] is large. The first two terms in equation 35 dominate, and [H+] converges to Ch@!, as it should.
Let’s also check what this says about a strongly basic solution. That means (Ceoh! − Ch@!) is large and positive. Therefore [H+] is small. The last two terms in equation 35 dominate, and [H+] converges to Kw/Ceoh!, as it should.
As an even more incisive check on the equations, we should consider the case where half of the weak acid is ionized. This is discussed near the end of section 4.3.
It is sometimes convenient to restrict attention to the parts of figure 1 that are not too near the top. That is, we focus attention on solutions that are definitely acidic, with a pH well below the pH of water. In this case, equation 10 simplifies to:
as you can see by starting with equation 10 and setting Kw to zero. Equation 36 can also be easily derived directly from equation 12, equation 14, and the simplified charge-conservation law:
Equation 36 is a quadratic polynomial. It has one positive root and one negative root. We care about the positive root, namely
For a strong acid (large Ka), equation 38 simplifies to
For a suffciently high concentration of weak acid, equation 38 simplifies to
In other words, the pH is the geometric mean between the concentration and the acid dissociation constant. For example, acetic acid has a pKa of 4.75. Now 1.78 millimolar acetic acid has a pC of 2.75, so it should have a pH of 3.77 according to equation 38, or approximately 3.75 according to equation 40, so the latter is off by less then one percent.
Within the regime where equation 40 is valid, as you increase the concentration, the pH drops, but only slowly. For each factor of 10 in the concentration, the pH drops by only half a unit, not a full unit, because of the square root in equation 40.
Beware that the range of validity does not extend to the point where the two factors on the RHS of equation 40 are equal. That is, at the point where the concentration is equal to the Ka, equation 40 might suggest that the pH would be equal to the pKa, but the reality is otherwise. You need at the concentration to be at least two orders of magnitude larger than Ka before the equation is reliably valid.
As another amusing corollary, when pH equals pKa, exactly half of the substance is ionized. That is, the ionized [A−] is equal to the unionized [HA] in accordance with the fundamental definition, equation 12.
If you want to achieve pH equal to pKa, the concentration needs to be very nearly twice the Ka, as you can see from equation 36. This is nice to know. Also it tells you that equation 40 is off by a factor of 2 in this regime. See figure 4.
As yet another corollary, when designing a pH buffer system, it makes sense to operate near pH = pKa. Typically this means adding rather a lot of weak acid (concentration more than Ka) and then raising the pH back to pKa by adding some strong base.
In the figure, the blue line is the more-accurate prediction, equation 38, while the red dashed line is the less-accurate prediction, equation 40. The height of the black tie-line corresponds to pH = pKa. The length of the line is 0.301 common-logarithmic units, which corresponds to a factor of two in concentration.
It must be emphasized that all the results in this section, including figure 4, assume that the acid is not unduly weak. It needs to be strong enough so that the H+ ions it contributes are the dominant contribution (dominating over the water contribution), even when it is only half ioinized. For more about the range of validity, see section 4.4.
Let’s investigate the range of validity of the approximations used in section 4.3. In this section we don’t assume low pH; we use the more general equations to see what happens at low and not-so-low pH.
We define x to represent the situation where [H+] = Ka = x and Cha = 2x. We plug this into the RHS of equation 41, and see how close it comes to being a root. We rewrite equation 10 as:
Taking the derivative we find:
Plugging in the definition of x we get:
From this we conclude that at pH 6 or below, the approximation leading to equation 36 should get the concentration right within a percent or so. At higher pH you have to use the full cubic.
Let’s consider a system that is the same as in section 4.2, except that we consider a weak base (rather than a weak acid) plus a strong base (EOH!). The buffer doesn’t require it, but we also include a certain amount of strong acid (H@!).
The weak base dissociation constant is:
As always, the water dissociation constant is:
The B-groups are conserved in our weak base:
Similarly, the @-groups are conserved:
And the E-groups are conserved:
Since we are assuming the acid and strong base are very strong, we can immediately simplify this to
As always, charge is conserved:
Now we turn the crank. We start by plugging into equation 44, using equation 49 to eliminate the unknown [BOH] from the system of equations.
That gives us
We now plug into the charge-conservation expression, equation 52, using equation 55, equation 50, and equation 45 to get rid of all the unknowns. That gives us
Multiplying through by [H+] gives us
Multiplying through by the remaining denominator gives us
If you want a monic polynomial, it is probably better to use equation 62, but if Kb is nonzero you could consider rewriting equation 58 as a monic polynomial:
Notice that the results are not sensitive to the concentration of strong base and strong acid separately, but only to the net difference between the two.
By setting (Ceoh! − Ch@!) to zero we obtain the simpler expression:
As a check on the algebra, you can set Kb to zero in equation 60, in which case [H+] = √Kw as it should.
As an even more incisive check on the algebra, solve for [OH] instead. The first step is:
which simplifies to:
which is the mirror image of equation 34.