The question is to find out the $\mathrm{pH}$ of a mixture of weak acid and strong acid. My book just states the formula as $$\mathrm{pH}=-\log \frac{C_2+\sqrt{C_2^2+4K_\mathrm{a}C_1}}{2}$$
where $C_1$ is the concentration (in mole/litre) of the weak acid (ionisation constant $K_\mathrm{a}$), and $C_2$ is that of the strong acid.
I understand that the strong acid will dissociate completely and the weak acid will dissociate with an ionisation constant. So the $\ce{H+}$ ion concentration from strong acid will be simply $C_2$ and that from weak acid will be $\sqrt{K_\mathrm{a}C_1}$. But I could not derive the above formula for the $\mathrm{pH}$ using these facts. I need help here.