Calculating ratio of conjugate base and acid when pH and pKa are given


> 
> Buffer solutions are used by biological mammalian systems to maintain the $\mathrm{pH}$ of blood plasma within a narrow range. In these systems, the compound from which this solution is obtained is $\ce{CO2}$, produced in cell respiration, which is converted into $\ce{HCO3-}$ and $\ce{H2CO3}$ inside the red blood cells. Using the Henderson-Hasselbalch equation, answer: $\mathrm{p}K\_\mathrm{a} = 6.35$. What is the ratio between $\ce{HCO3-}$ and $\ce{H2CO3}$ in a blood sample with $\mathrm{pH} = 7.4$?
> 
> 
> 


The problem is I try to make the exercise in this way: 


$$\mathrm{pH}= \mathrm{p}K\_\mathrm{a} + \log \left(\frac{\ce{[HCO3-]}}{\ce{[H2CO3]}} \right)$$


BUT in the solution they make $$\mathrm{pH} =\mathrm{p}K\_\mathrm{a} - \log \dfrac{[\ce{HCO3-}]}{[\ce{H2CO3}]}$$


They make the inverse of $$\mathrm{pH} = \mathrm{p}K\_\mathrm{a} + \log \dfrac{[\ce{H2CO3}]}{[\ce{HCO3-}]}$$


And this don't make sense for me. I don't understand. 


The solution given is in the white box on the left side.
[![The white box is the solution who they give to me ](https://i.stack.imgur.com/7Nx8u.jpg)](https://i.stack.imgur.com/7Nx8u.jpg)




Recall the fundamental properties of the logarithm 
$$+\log \left(\frac{a}{b}\right)$$


is the same as


$$-\log \left(\frac{b}{a}\right)$$


so Henderson Hasselbach can have plus or minus signs. The correct equation is


$$\mathrm{pH} = \mathrm{p}K\_\mathrm{a} + \log \left(\frac{\text{conjugate base}}{\text{acid}}\right)$$


or 


$$\mathrm{pH} = \mathrm{p}K\_\mathrm{a} - \log \left(\frac{\text{acid}}{\text{conjugate base}}\right)$$


Now sort out whether the textbook solution is right or not.


 2

Important is the knowledge how $K\_\mathrm{a}$ is defined:


$$K\_\mathrm{a}=\frac{\ce{[H+][A-]}}{\ce{[HA]}}$$


If we perform logarithmization, we get:


$$\log{K\_\mathrm{a}}=\log{\ce{[H+]}} + \log{\frac{\ce{[A-]}}{\ce{[HA]}}}$$


If we apply the operator $\mathrm{p}X = - \log{X}$:


$$\mathrm{p}K\_\mathrm{a}=\mathrm{pH} -\log{\frac{\ce{[A-]}} {\ce{[HA]}}}$$


respectively


$$\mathrm{pH} = \mathrm{p}K\_\mathrm{a} + \log{\frac{\ce{[A-]}} {\ce{[HA]}}}$$


In our case, $\ce{HA = H2CO3}$ and $\ce{A- = HCO3-}$.


 0