What is the formula for theoretical buffer capacity for a diprotic buffer system?

According to Chembuddy, the formula for theoretical buffer capacity for a monoprotic buffer system is as follows:



> 
> $$β = 2.303\left(\frac{K\_\mathrm{w}}{[\ce{H+}]} + [\ce{H+}] + \frac{C\_\mathrm{buf}K\_\mathrm{a}[\ce{H+}]}{(K\_\mathrm{a} + [\ce{H+}])^2}\right)$$
> 
> 
> 


where $C\_\mathrm{buf}$ is the total concentration of buffer and $K\_\mathrm{w}$ is the water ionization constant.


However, I have conducted a lab in which I mix $\ce{C4H6O4}$ (tartaric acid; diprotic) with its double salt $\ce{NaKC4H4O4}$ to create a 1.0 M potassium sodium tartrate buffer solution where there are two simultaneous buffer systems. Also, $\mathrm{p}K\_\mathrm{a1}$ and $\mathrm{p}K\_\mathrm{a2}$ of tartaric acid are quite similar (around 1.6 difference), so I believe that this alternative equation that provides the theoretical buffer capacity for a system with multiple buffers:



> 
> $$β = 2.303\left(\frac{K\_\mathrm{w}}{[\ce{H+}]} + [\ce{H+}] + \sum\frac{C\_\mathrm{buf}K\_\mathrm{a}[\ce{H+}]}{(K\_\mathrm{a} + [\ce{H+}])^2}\right)$$
> 
> 
> 


will not be correct in my case.


Is this right? If so, is there a proper way to theoretically calculate the buffer capacity of the composite system?




The logic is the same used for a [monoprotic weak acid](https://chemistry.stackexchange.com/a/54794/80491), considering the two ionization steps, as indicated by [@MaxW](https://chemistry.stackexchange.com/questions/111816/why-does-buffer-capacity-of-tartrate-buffer-generally-decrease-as-the-buffer-ph/111820#comment210160_111820).


For a diprotic weak acid we have:


The *first ionization*


\begin{align\*}
\ce{H2A + H2O &<=> H3O+ + HA-} &K\_{\ce{a}1}=\frac{\ce{[H3O+][HA-]}}{\ce{[H2A]}}
\end{align\*}


and the *second ionization*


\begin{align\*}
\ce{HA- + H2O &<=> H3O+ + A^{2-}} &K\_{\ce{a}2}=\frac{\ce{[H3O+][A^{2-}]}}{\ce{[HA-]}}
\end{align\*}


To make further calculations easier let's assume that the strong base added is monoprotic:


\begin{align\*}
\ce{BOH &-> B+ + HO-}
\end{align\*}


Charge balance of the solution is given by the equation


$$\ce{[H3O+]} + \ce{[B+]} = \ce{[OH-]} + \ce{[HA-]} + \ce{2[A^{2-}]}$$


When combined give us formula for the amount of the strong base (for short $\ce{[H3O+]}$ was written as $\ce{[H+]}$)


$$C\_{\ce{B}} = 
\frac{K\_{\ce{w}}}{\ce{[H+]}}-
\ce{[H+]}+
\frac{C\_{\ce{H2A}}K\_{\ce{a}1}\left(\ce{[H+]}+2K\_{\ce{a}2}\right)}
{\ce{[H+]}^2 + K\_{\ce{a}1}\ce{[H+]} + K\_{\ce{a}1}K\_{\ce{a}2}}$$


when $K\_\ce{w}$ is the water ionization equilibrium constant, $C\_{\ce{H2A}}$ is the *concentration of diprotic weak acid*, $K\_{\ce{a}1}$ and $K\_{\ce{a}2}$ are the acid dissociation constants, and $C\_{\ce{B}}$ is the *concentration of strong base added*.


The buffer capacity of a diprotic weak acid-conjugate bases buffer is defined as the
maximum amount strong base that can be added before a significant change in the pH will occur.


\begin{align\*}
\beta &= \frac{dC\_{\ce{B}}}{d\ce{pH}} = \frac{dC\_{\ce{B}}}{d\ce{[H3O+]}}\frac{d\ce{[H3O+]}}{d\ce{pH}}\\
\end{align\*}


Differentiating the equation we should then find that


\begin{align\*}
\beta &= \left[-\frac{K\_{\ce{w}}}{\ce{[H+]}^2}-1 -
\frac{C\_{\ce{H2A}}K\_{\ce{a}1} \left(\ce{[H+]}^2 + 4K\_{\ce{a}2}\ce{[H+]} + K\_{\ce{a}1}K\_{\ce{a}2} \right)}
{\left(\ce{[H+]}^2 + K\_{\ce{a}1}\ce{[H+]} + K\_{\ce{a}1}K\_{\ce{a}2}\right)^2}\right]
\left(-\ce{[H+]}\ln{10}\right)
\end{align\*}


So finally buffer capacity is given by


\begin{align\*}
\beta &= 2.303\left[\frac{K\_{\ce{w}}}{\ce{[H+]}}+\ce{[H+]}+
\frac{C\_{\ce{H2A}}K\_{\ce{a}1}\ce{[H+]}\left(\ce{[H+]}^2 + 4K\_{\ce{a}2}\ce{[H+]} + K\_{\ce{a}1}K\_{\ce{a}2} \right)}
{\left(\ce{[H+]}^2 + K\_{\ce{a}1}\ce{[H+]} + K\_{\ce{a}1}K\_{\ce{a}2}\right)^2}\right]
\end{align\*}


you can then plot $\beta$ *vs* $\ce{pH}$ and from this you should be able to find what you want.


Look a example based on [this question](https://chemistry.stackexchange.com/q/111816/80491). I hope it be useful.


[![Buffer Capacity Example](https://i.stack.imgur.com/uALOs.png)](https://i.stack.imgur.com/uALOs.png)


 5