AcidBase Systems  a Mathematical Toolkit
Simple ClosedForm Equations
Given:  Nprotic acid  H_{N}A 
or zwitterionic acid  H_{N}A^{+Z} with Z ≥ 1 
specified by N dissociation constants: K_{1}, K_{2} to K_{N}.
The pHdependence of the acid is then characterized by the following easytoplot functions:^{1}
(1.1)  buffer capacity:  \(n(x) = \left( Y_1  Z \right) + \dfrac{w}{C_T}\) 
(1.2)  buffer intensity:  \(\beta(x) \equiv \dfrac{dn}{d\,pH} = (\ln 10) \left( Y_2  Y_1^2 + \dfrac{w+2x}{C_T} \right)\) 
(1.3)  1^{st} derivative of β:  \(\dfrac{d\beta}{d\,pH} = (\ln 10)^2 \left( Y_3  3Y_1Y_2 + 2Y_1^3 + \dfrac{w}{C_T} \right)\) 
Notation and abbreviations:^{2}
(2.1)  activity of H^{+}:  x ≡ {H^{+}} = 10^{pH} 
(2.2)  equivalent fraction:  n ≡ C_{B}/C_{T} 
(2.3)  total amount of acid:  C_{T} 
(2.4)  total amount of strong base:  C_{B} 
(2.5)  purewater balance:  w(x) ≡ [OH^{}] – [H^{+}] ≈ K_{w}/x – x 
(2.6)  selfionization constant:  K_{w} = 10^{14} (at 25 °C) 
(2.7)  charge of highest protonated acid species:  Z 
Common acids are characterized by Z = 0; only zwitterionic acids (e.g. amino acids) are identified by Z ≥ 1. The parameter Z itself enters only 1.1, where it acts as a constant offset. The buffer intensity β and its derivative in 1.2 and (1.3) are both independent of Z.
Moments Y_{L}. The building blocks from which the formulas are built are the socalled moments Y_{1}, Y_{2} and Y_{3}. They are weighted sums over ionization fractions a_{j} from j=0 to N:
(3)  Y_{L}(x) ≡ \(\sum\limits_{j=0}^{N}\,\) j^{ L} a_{j}(x) 
In particular, we have:
(3.1)  Y_{0} = a_{0} + a_{1} + … + a_{N} = 1  ⇒  mass balance  
(3.2)  Y_{1} = a_{1} + 2a_{2} + … + N a_{N}  ⇒  enters buffer capacity  
(3.3)  Y_{2} = a_{1} + 4a_{2} + … + N^{2}a_{N}  ⇒  enters buffer intensity β  
(3.4)  Y_{3} = a_{1} + 8a_{2} + … + N^{3}a_{N}  ⇒  enters 1^{st} derivative of β 
Ionization Fractions. To recapitulate: An Nprotic acid is completely specified by the acid’s N acidity constants K_{1}, K_{2} to K_{N}. The ionization fractions a_{j} rely on these acidity constants in the following way:
(4)  \(a_j = \left( \dfrac{k_j}{x^j} \right ) \,a_0\)  with  \(a_0 = \left( 1+\dfrac{k_1}{x} +\dfrac{k_2}{x^2}+\cdots +\dfrac{k_N}{x^N} \right)^{\!1}\) 
where k_{j} are the cumulative equilibrium constants (as products of the ‘stepwise’ acidity constants):
(5)  k_{0} = 1, k_{1} = K_{1}, k_{2} = K_{1}K_{2}, … k_{N} = K_{1}K_{2}…K_{N} 
The a_{j}’s are the smallest building blocks of our math toolkit.
Speciation. The equilibrium distribution of the acid species [j] is closely related to the ionization fractions:
(6)  [j] = C_{T} a_{j}  where  [j] ≡ [H_{Nj }A^{Zj}]  (for j = 0,1, … , N) 
Here, [0] represents the highest protonated species and [N] the fully deprotonated species. The symbol j is an integer that also indicates the charge of the species (common acids are characterized by Z=0):
(7)  charge of species [j]:  z_{j} = Z – j 
Summary. The following scheme summarizes the modular structure of the general equations:
What we call ‘titration curve’ is just the (normalized) buffer capacity. It represents the equivalent fraction as function of pH: n = n(pH).^{3} The 1^{st} derivative of the buffer capacity is the buffer intensity:
(8)  buffer intensity β ≡ \(\mathrm{\dfrac{d}{d\,pH}}\) buffer capacity = \(\mathrm{\dfrac{d}{d\,pH}}\) n(pH) 
Equivalence Points (EP). Equation (1.1) can be used to plot curves of EPs and semiEPs into pHC_{T} diagrams.
Examples for N = 1, 2, and 3
Let’s apply the analytical formulas to four common acids, which are characterized by the following acidity constants (where pK_{j} = –lg K_{j}):
Acid  Formula  Type  pK_{1}  pK_{2}  pK_{3} 

acetic acid  CH_{3}COOH  HA  4.76  
carbonic acid^{4}  H_{2}CO_{3}  H_{2}A  6.35  10.33  
phosphoric acid  H_{3}PO_{4}  H_{3}A  2.15  7.21  12.35 
citric acid  C_{6}H_{8}O_{7}  H_{3}A  3.13  4.76  6.4 
Diagrams
Ionization Fractions a_{j} based on 4:
Moments Y_{L} based on 3:
[Note: For the monoprotic acid HA — shown in the topleft diagram — all four curves are identical.]
Buffer Capacities (i.e. “titration curves”) based on 1.1 for different amounts C_{T} of acid:^{5}
The Y_{1}curve (in dark blue) describes the asymptotic case of infinitely large C_{T} (i.e. highlyconcentrated acids).
Buffer Intensity β (green curves) based on 1.2 and its first derivative (red curves) based on 1.3:
In addition: buffer capacities (i.e. titration curves) are shown as blue curves.
Polynomials for x = 10^{pH}
1.1 calculates n (or the acid amount C_{T}) for a given pH, which is indeed a nice and simple formula. Unfortunately, the inverse task calculating the pH for a given amount of C_{T} (or n) does not hold a simple equation in store for us. On the contrary, it leads to a polynomial of high degree, namely degree N+2:
(9)  \(0 \ =\ \sum\limits_{j=0}^{N}\left \{ x^2 + (nj) C_TK_w \right \}\, k_j \,x^{Nj}\) 
The (high) degree of the polynomial is independent of whether we set n=0 or not (where n refers to the amount of strong base: n = C_{B}/C_{T}).
The problem is that there is no algebraic expression for solving polynomials of degree higher than 4, no matter how hard we try. Thus, numerical rootfinding methods should be applied.
Example N=1. The monoprotic acid represents the simplest case, where the sum in 9 runs only over two terms, j = 0 and 1. With k_{0} = 1 and k_{1} = K_{1} we get a cubic equation:
(9a)  0 = x^{3} + {K_{1} + nC_{T}} x^{2} + {(n1)C_{T} – K_{w}} x – K_{1}K_{w} 
Example N=2. For diprotic acids, the polynomial becomes a quartic equation. Now the sum in 9 runs over three terms, j = 0, 1 and 2. With k_{0} = 1, k_{1} = K_{1} and k_{2} = K_{1}K_{2} it yields:
(9b)  0 = x^{4} + {K_{1} + nC_{T}} x^{3} + {K_{1}K_{w} + (n1)C_{T}K_{1} – K_{w}} x^{2}  
+ K_{1} {(n1)C_{T}K_{1} – K_{w}} x – K_{1}K_{2}K_{w} 
Final Note
The presented mathematical toolkit provides a better understanding of the acidbase system. But it will and can never replace numerical models like PhreeqC or aqion, which are able to handle realworld problems (including activity corrections, aqueous complex formation, etc.).
Remarks & Footnotes

The mathematical derivation is provided as Review (2021), Lecture (2023) and/or PowerPoint (2017). ↩

Square brackets [..] denote molar concentrations (in contrast to activities, which are expressed by curly braces {..}). ↩

In textbooks, the equivalent fraction is often abbreviated by f. ↩

In hydrochemistry, it is common practice to use the composite carbonic acid, H_{2}CO_{3}^{*} = CO_{2}(aq) + H_{2}CO_{3} instead of the true carbonic acid. ↩

Negative values of n mimic the withdrawal of the strong base from the solution. It is equivalent to the addition of a strong monoprotic acid (e.g. HCl). ↩