I have a small problem of equilibrium that I counldn't solve. I want the exact answer. No approximations please. $$ \begin{array}{ll} \ce{H2O + H2O <=> H3O+ + OH-} &\quad\left(K_w = 1\cdot 10^{-14}\right) \\ \ce{HNO2 + H2O <=> H3O+ + NO2-} &\quad\left(K_a = 4\cdot10^{-4}\right) \\ \end{array} $$
Objective: Find the concentration every substance, given that the initial value of $[\ce{HNO2}]_0$ is known. Feel free to insert any numerical value for it, if you wish. I have no idea how to solve for the concentrations, when I have two finite ionization constants. How to solve it?
Of course, in this situation, most people would ignore the contribution of the auto-ionization constant of water (that is, ignore the first reaction), leaving only the second one, which is fairly easy to calculate the concentrations. I do not want that.
The reading of this part is optional. Feel free to skip everything down below if you wish. This is an example that I understood how to solve: $$ \begin{array}{ll} \ce{H2O + H2O <=> H3O+ + OH-} &\quad\left(K_w = 1\cdot 10^{-14}\right) \\ \ce{HCl + H2O <=> H3O+ + Cl-} &\quad\left(\mbox{Full Dissociation}\right) \\ \end{array} $$
Hereby, lets say we had an initial concentration of $[\ce{HCl}]_0$. It will then fully dissociate, thus we shall have: $[\ce{HCl}]_0 = [\ce{H3O+}]_0$. Now we correct considering the water autoionization:
$$ \begin{array}{ll} [\ce{H3O+}] = [\ce{HCl}]_0 + x \\ [\ce{OH-}] = x \\ \end{array} $$
We solve for $x$ such that $[\ce{H3O+}][\ce{OH-}] = K_w$. This will give me a quadratic equation, which using bhaskara becomes easy to solve.
Again, most people here would ignore the first reaction. And, in certain circumstances, they could, for instance, find a potentially wrong value of $\text{pH}$. Classical example: Just let $[\ce{HCl}]_0 = 10^{-8}$, and then ignoring water autoionization, it will fully dissociate thus $[\ce{H3O+}]_0 = 10^{-8}$, giving $\mathrm{pH = 8}$. So, we just got a basic $\text{pH}$ after just inserting hydrochloric acid in water!