Calculating the pH of a buffer made by a diprotic acid and its double salt The concentration of the diprotic acid (tartaric acid) will be constant at $\pu{ 0.1 M}$. I want to find the concentration of its double salt (potassium sodium tartrate) needed to create a buffer of $\pu{ pH }$=x (for example,x= 4.0). How would I do this? Do I have to use the Henderson-Hasselbalch equation? Make certain assumptions? 

I tried to set up two equilibrium expressions with $K_\mathrm{a1}$ and $K_\mathrm{a2}$ as follows:

$$K_\mathrm{a1} =\frac{[\ce{C4H5O6-}][\ce{H+}]}{[\ce{C4H6O6}]}$$
and

$$K_\mathrm{a2} =\frac{[\ce{C4H4O6^{2-}}][\ce{H+}]}{[\ce{C4H5O6-}]}$$

Can I multiply $K_\mathrm{a1}$ and $K_\mathrm{a1}$ to eliminate$[\ce{C4H5O6-}]$, and then get the concentration of $\ce{C4H4O6^{2-}}$ necessary by plugging in $\pu{0.1M}$ for$[\ce{C4H6O6}]$ and the target $\pu{pH}$ in the appropriate form in $[\ce{H+}$]? I feel like I'm making some big assumptions here, though.

(Also, please forgive me; I don't know how to use LaTeX or Tex.)

If I try to make the assumption that the second dissociation does not occur as it is too weak (which it isn't) I wouldn't have the concentration of $\ce{C4H4O6^{2-}}$ in my equation, which is what I'm trying to find.
Can I multiply Ka1 and Ka1 to eliminate [$\ce{C4H5O6−}$], and then get the concentration of C4H4O62− necessary by plugging in 0.1 M for [C4H6O6] and the target pH in the appropriate form in [H+]


No, because $\ce{C4H5O6−}$ is a one of the major species. In fact, if you add the tartaric acid and its double salt at equimolar ratios, $\ce{C4H5O6−}$ will be the only major species. As a first approximation, you can let this reaction go to completion. If you have an excess of the acid, there will be a mixture of $\ce{C4H5O6−}$ and acid as major species. If you have the double salt in excess, there will be a mixture of the double salt and $\ce{C4H5O6−}$ as major species.


  Do I have to use the Henderson-Hasselbalch equation? Make certain assumptions? 


If your ratio of reactants and products is such that you have a conjugate acid: base pair as the major species, you can use Henderson-Hasselbalch as the next step to estimate the pH. (If your major species are $\ce{C4H6O6}$ and $\ce{C4H5O6−}$, use $K_{a1}$, if they are $\ce{C4H5O6-}$ and $\ce{C4H4O6^2−}$ use $K_{a2}$.) In some cases, that's a good approximation, in others, not. You can test that by calculating the concentration of all species (based on the approximate pH) and then calculate Q for the two acid base equilibria to see how well they match K.