aka buffer
A buffer solution (more precisely, pH buffer or hydrogen ion buffer) is an aqueous solution consisting of a mixture of a weak acid and its conjugate base, or vice versa. Its pH changes very little when a small or moderate amount of strong acid or base is added to it and thus it is used to prevent changes in the pH of a solution.
https://www.wikiwand.com/en/Buffer_solution
Buffers are important in biology, as they help avoid very acidic or very basic solutions, where the function of biological molecules may be altered, and be lethal for the cell.
A buffer is most effective when the pH is close to the pKa of its acid component
Using is a constant, which is the total concentration of HA before dissociating.
gives
Well I think I need also the water equilibrium equation, etc. really.
See the above function plotted: here