# Diprotic Acids

The mathematical description of diprotic acids (including carbonic acid as a case of exceptional interest) leads to simple analytical equations. The derivation will give us a better understanding of what happens “inside” hydrochemical models and software.1

Basic Set of Mathematical Equations If a diprotic acid H2A is added to pure water, the equilibrium system is characterized by five dissolved species: H+, OH-, H2A, HA-, and A-2.

Thus, five equations are required for a thorough mathematical description:2

 (1a) K1 =  {H+} {HA-} / {H2A} (1st diss. step) (1b) K2 =  {H+} {A-2} / {HA-} (2nd diss. step) (1c) Kw =  {H+} {OH-} (self-ionization of water) (1d) CT =  [H2A] + [HA-] + [A-2] (mass balance) (1e) 0 =  [H+] – [HA-] – 2 [A-2] – [OH-] (charge balance)

The first three equations are mass-action laws; the last two equations represent the mass balance and the charge balance. While the mass-action laws are based on activities (denoted by braces), the mass-balance and charge-balance equations rely on molar concentrations (denoted by square brackets).

An exact solution in closed form (i.e. an analytical formula) is only obtainable if the activities in the first three equations are replaced by molar concentrations.3 This is valid either in (very) dilute systems or by switching to conditional equilibrium constants cK. In the following we assume that this has been done (without explicitly introducing the notation cK).

Ionization Fractions

Let’s start with the acid-species distribution as a function of pH. To study this behavior, a subset of the total equation system is sufficient, consisting of three equations only: (1a), (1b), and (1d). From the first two equations one gets (with the abbreviation x = {H+} = 10-pH):

 (2) [H2A] = (x/K1) [HA-]     and     [A-2] = (K2/x) [HA-]

Entering it into 1d yields

 (3) CT  =  (x/K1 + 1 + K2/x) [HA-]

This allows us to write the following simple formulas for the three dissolved species:

 (4) [H2A] = CT a0 [HA-] = CT a1 [A-2] = CT a2

based on three ionization fractions:

 (5a) a0   =   [ 1 + K1/x + K1K2/x2 ]-1 (5b) a1   =   [ x/K1 + 1 + K2/x ]-1 = (K1/x) a0 (5c) a2   =   [ x2/(K1K2) + x/K2 + 1 ]-1 = (K1K2/x2) a0

It’s easy to check that all three coefficients add up to 1:

 (6) a0 + a1 + a2 = 1 (mass balance)

Because of their elegance and simplicity, diagrams of ionization fractions (also known as Bjerrum plots) appear in almost every textbook on hydrochemistry. Below is an example for the carbonic acid system (with pK1 = 6.35, pK2 = 10.33): The species concentrations in 4 can also be put into a more compact form:

 (7) [H2-j A-j]  =  CT aj(x) for  j = 0, 1, 2

This formula, together with 5, predicts the pH dependence of the three acid species. Aside from the normalization constant CT, the concentration curves corresponds to the ionization curves in the above diagram.

Be careful though, CT is not a constant, as 7 would suggest; CT depends on pH – as shown below – and can therefore not be regarded as an independent parameter. This misunderstanding comes from the fact that we have so far ignored both the charge balance and the self-ionization of the water, i.e. 1e and (1c).

Exact Analytical Solution

The problem mentioned above is solved by incorporating two constraints: charge balance and the self-ionization of water. Setting 1d into 1e and using 7, together with the shorthand yj = [H2-j A-j], yields:

 0 =   x – y1 – 2 y2 – Kw/x =   x – Kw/x – (y1 + 2 y2) =   x – Kw/x – CT (a1 + 2 a2)

This provides the exact relationship between the total amount of acid CT and the pH value (= –lg x):

 (8) $$C_T(x) \ =\ \dfrac{x-K_w/x}{a_1 + 2a_2} \ =\ \left(x-\dfrac{K_w}{x}\right) \ \dfrac{K_2/x + 1 + x/K_1} {1 + 2K_2/x}$$

In fact, this one-liner encapsulates the entire information contained in the set of five nonlinear equations, i.e. 1a to (1e).

Based on 8 we are now in a position to replace the approximate formula in 7 by an exact formula valid for all three acid species:

 (9) [H2-j A-j]  =  $$\left( \dfrac{x-K_w/x}{a_1 + 2a_2} \right) a_j$$ for   j = 0, 1, 2

[To provide an example, the equations above were applied for the description of the closed and open CO2 systems.]

Inverse Task. Given the pH (or x), 8 calculates CT. The inverse task to calculate the pH (or x) for a given CT, however, is intricate, because an explicit function, such as pH = f(CT), does not exist. The only thing we can offer is an implicit function in form of a polynomial of degree 4 in x, i.e. a quartic equation:

 (10) x4 + K1 x3 + (K1K2 – CT K1 – Kw) x2 – K1 (2CT K2 + Kw) x – K1K2Kw  =  0

To recap: There is 8, there is 10, and there is the set of five equations defined in (1). All three entities are equivalent; they represent one and the same matter: the complete mathematical description of a diprotic acid. Surely, calculating CT for a given x (or pH) by 8 is much easier than to solve a 4th order equation to get x (or pH) for a given value of CT.

Diprotic Acids including Ampholytes and Conjugate Bases

Any diprotic acid is tight-knit with its conjugate base(s), H2A ⇔ BHA ⇔ B2A, where B refers to the cation of a monoacidic base (B+ = Na+, K+, or NH4+). For example: the triple H2CO3, NaHCO3, and Na2CO3 represent such an acid-ampholyte-base system.

Let’s denote the (stoichiometric) number of B+ by n, then we get the compact notation:

 (11) BnH2-n A (or  H2-n A-n) with n = 0 for acid (H2A) n = 1 for ampholyte (BHA) n = 2 for base (B2A)

The set of equations to describe this system is

 (12a) K1 =  {H+} {HA-} / {H2A} (1st diss. step) (12b) K2 =  {H+} {A-2} / {HA-} (2nd diss. step) (12c) Kw =  {H+} {OH-} (self-ionization) (12d) CT =  [H2A] + [HA-] + [A-2] (mass balance) (12e) 0 =  [H+] + n [H2A] + (n-1) [HA-] + (n-2) [A-2] – [OH-] (proton balance)

It differs from the set of equations (1) only by a single equation, namely the last line, where “charge balance” is replaced by the more general concept of proton balance.4

Remarkably enough, the last equation (12e) is the sole equation that explicitly depends on n. The other four equations are independent on the type of reactant we add to water (acid, ampholyte, or base). In particular, the ionization fractions derived in 5a to (5c) for the diprotic acid, H2A, are independent of n; they remain exactly the same in our extended approach.

The set of equations (12) also represents the mathematical core for the description of buffer systems.

Exact Relationship between pH and CT

The entire set of equations defined in 12a to (12e) can be condensed into a single formula, much like it was done in 8 above:

 (13) CT(n,x)  =  $$\dfrac{x-K_w/x}{a_1 + 2a_2 - n} \, =\, \left(x-\dfrac{K_w}{x}\right)\, \left(\dfrac{1+2K_2/x} {x/K_1 + 1 + K_2/x} - n\right)^{-1}$$

For n=0 it falls back to 8. Based on 13 we get – in place of 9 – the generalized formula for the three acid species:

 (14) [H2-j A-j]  =  $$\left( \dfrac{x-K_w/x}{a_1 + 2a_2 - n} \right) a_j$$ for   j = 0, 1, 2

Inverse Task. The conversion of CT(n,x) into its inverse form x(n,CT) leads again to a polynomial of degree 4 in x, i.e. a quartic equation:

 (15) x4 + {K1 + nCT} x3 + {K1K2 + (n–1)CT K1 – Kw} x2 + K1 {(n–2)CT K2 – Kw} x – K1K2Kw  =  0

Each formula, whether 13 or 15, contains three equations in compact form: one for an acid (n=0) – already presented in 8 and (10), one for an ampholyte (n=1), and one for a base (n=2).

Plots. The diagram below displays CT as a function of pH. The solid lines represent 13 for n = 0, 1, and 2. The dots are exact results calculated with aqion (or PhreeqC), where activity corrections are considered. (Activity corrections are especially relevant for high concentrations, i.e. high ionic strengths.) Independent of the type of acid, the first factor in the parenthesis of 13, x – Kw/x, becomes zero at pH = 7.0, i.e. at x = 10-7. In fact, this must be the case, because CT=0 means pure water, and vice versa.

Proton Balance Equation (Proton Condition)

The proton balance is often used in acid-base theory, and it was used in 12e above. It is a balance between the species that have excess protons versus those that are deficient in protons relative to a defined proton reference level (PRL).

Example 1. The simplest case is pure water with its three species H+, OH-, and H2O. Choosing H2O as the reference level, the species H+ (or H3O+) is enriched in 1 proton (excess proton), while OH- is depleted in 1 proton (deficient proton). The proton balance equation becomes:5

PRL excess protons = deficient protons
(16) H2O [H+] = [OH-]

Because water is ever-present in a acid-base system, H+ and OH- always enter the proton balance, one on the left- and the other on the right-hand side of the equation.

Example 2. The carbonic acid system has three distinct reference levels:6

PRL excess protons = deficient protons
(17a) H2CO3 [H+] = [HCO3-] + 2 [CO3-2] + [OH-]
(17b) HCO3- [H+] + [H2CO3] = [CO3-2] + [OH-]
(17c) CO3-2 [H+] + 2 [H2CO3] + [HCO3-] = [OH-]

How to write down these equations? First, the two species H+ and OH- that appear in each equation trace back from the H2O-reference level in 16.7 They have their permanent place on opposite sides in any proton balance. Thus, all we have to do is to add the carbonic-acid species (H2CO3, HCO3-, CO3-2) to the correct side of the equation.

In 17a, H2CO3 is the reference level. There are no carbonate species that have more protons than H2CO3, hence, there is nothing to add to the left-hand side. Conversely, HCO3- is deficient by 1 proton and CO3-2 by 2 protons; therefore, both species enter the right-hand side.8

In 17b, HCO3- is the reference level. From this perspective, H2CO3 has 1 excess proton (species enters the left-hand side), while CO3-2 is deficient by 1 proton (species enters the right-hand side).

In 17c, CO3-2 is the reference level. Now, H2CO3 has 2 excess protons and HCO3- has 1 excess proton (both species enter the left-hand side); but there are no species that have less protons than CO3-2 (i.e. no carbonate species enters the right-hand side).

General Case. Given the proton-reference level by H2-n A-n, the proton balance equation becomes (for n = 0, 1, 2):

PRL 0 = excess protons – deficient protons
(18) H2-n A-n   0 = [H+] + n [H2A] + (n-1) [HA-] + (n-2) [A-2] – [OH-]

This one-liner comprises all three equations of Example 2. Equation (18) was adopted in 12e above.

The proton reference level (PRL) is closely related to the concept of alkalinity and equivalence points (often both terms are used as synonyms).

Remarks & Footnotes

1. An alternative description, based on the tableaux method, is presented as PowerPoint. (Perhaps the best introduction to the tableaux method is given in the classical textbook of F.M.M. Morel and J.G. Hering: Principles and Applications of Aquatic Chemistry, John Wiley, 1993).

2. For a rigor mathematical description of N-protic acids we refer to the lecture

3. except for H+. Replacing [H+] by {H+} is not necessary, because the pH value is related to the activity of H+ (not concentration).

4. It is not absolutely necessary to build the whole thing upon the proton balance; instead of the proton balance one can also use an (extended) charge balance – like here or here

5. Square brackets denote molar concentrations.

6. In hydrochemistry, instead of H2CO3 the composite carbonic acid H2CO3* is used. [In the program, H2CO3* is abbreviated by CO2, because almost all of H2CO3* is just dissolved CO2.]

7. The reference level “H2O” is not extra indicated in the table’s PRL column. But keep in mind that it is always present (in addition to H2CO3, HCO3- or CO3-2).

8. If a species has lost 2 protons relative to PRL, its concentration is multiplied by 2.