A more rigorous theory of $pH$

Titration of a biacid by a strong base

Exercise 11

Titrated are $vai\; mL$ of a diacid with formal molar concentration $cai$ and succesives acidity constants $k1$ and $k2$ by $cbi\; M$ $NaOH$. a) Establish as a function of $x$ (= volume in $mL$ of base already added) 6 equations between molarities at equilibrium: $[H_2B]$, $[H_3O^+]$, $[HB^-]$, $[Na^+]$, $[B_2^-]$ and $[OH^-]$ (the electroneutrality condition, two conditions of conservation of matter, two equilibrium conditions and the ionic product of water) Find the equation that the system leads to.