Approximations for calculating pH & their qualitative meaning
​by Rauan kaldybaev

Introduction

Out[]=
Actual pH
Weak acid approximation
Strong acid approximation
As a physicist learning chemistry, one thing that bothered me about how we calculate the pH of a solution is that we usually don’t account for the dissociation of water. It is true that in most practical applications, dissociation of water can be neglected. Still, conceptually it somehow seems wrong to not take water into account. If there are two chemical reactions going on in a solution, it is only proper to think of both of them and only neglect one of them when it’s completely clear that it can be neglected. In addition, the “standard formula” for acid in water problems predicts that the
pH
of neutral water is infinite, which is of course not true. The current computational essay looks at several approximations for the calculation of
pH
. For each approximation, it computes the error and shows that indeed, the approximations are usually very accurate. The essay then compares the predictions of these approximations to what we get directly from the chemical equilibrium equation and uses these comparison to draw qualitative conclusions about the process of dissociation of acid.

Deriving the equation of chemical equilibrium of acid in water

Consider a solution containing a small amount of acid. For definiteness, let’s restrict the discussion to monoprotic acids, which can only donate one
+
H
ion - like
HCl
. A generic monoprotic acid dissociates as
H
2
O+HA↔
H
3
+
O
+
-
A
- for example,
HCl
dissociates as
H
2
O+HCl↔
H
3
+
O
+
-
Cl
. The corresponding chemical equilibrium equation is
[
H
3
+
O
][
-
A
]
[HA]
=
K
a
(
1
)
Because nothing enters or leaves the solution and the radical
-
A
isn’t created or destroyed, the total amount of
-
A
in the solution is preserved. Mathematically,
[HA]+[
-
A
]=
a
0
, where
a
0
is some constant:
[HA]+[
-
A
]=
a
0
(
2
)
Apart from the dissociation of acid, another process that goes on in the solution is the dissociation of water,
2
H
2
O↔
H
3
+
O
+
-
OH
. For this reaction, the equilibrium equation is
[
H
3
+
O
][
-
OH
]=
K
w
(
3
)
The ion
H
3
+
O
is formed either from the reaction
2
H
2
O↔
H
3
+
O
+
-
OH
or from
H
2
O+HA↔
H
3
+
O
+
-
A
. The hydroxide ion
[
-
OH
]
is formed only from the dissociation of water. Denoting the molar concentration of water that has undergone dissociation as
d
, we obtain
[
H
3
+
O
]=[
-
A
]+d​​[
-
OH
]=d
(
4
)
Combining the two previous equations, we arrive at the formula for the concentration of
H
3
+
O
:
[
H
3
+
O
]=
a+
2
a
+4
K
w
2
(
5
)
Here,
a≡[
-
A
]
denotes the amount of acid that has undergone dissociation.
pH≡-Lg[
H
3
+
O
]
is then given by
pH=-Log10
a+
2
a
+4
K
w
2

(
6
)
If no acid dissociates,
a=0
, and the concentration of
H
3
+
O
becomes equal to
K
w
≈1·
-7
10
. The
pH
is then equal to 7, which is the acidity of pure water. If
a
is much larger than
K
w
, the formula can be approximated as
[
H
3
+
O
]≈a
- in other words, almost all
H
3
+
O
ions present in the solution are due to the dissociation of acid. If we combine this formula with the equations (1) and (2), we arrive at an equation that allows us to determine the amount of acid
a
that has undergone dissociation given the initial concentration
a
0
:
K
w
=
2
K
a
2
a
0
-a
a
-
K
a
(
a
0
-a)
(
7
)
This equation follows directly from the chemical equilibrium equations for the dissociation of acid and water (1), (3) and from the molar equations (2), (4). So far, it does not involve any approximations. And although it could be solved exactly using Cardano’s formula, the latter is far too complicated to give much quantitative insights into the problem and too bulky for hand calculations. Luckily, the answer to (7) can be, to a good degree of precision, found using several simple approximations discussed in the next sections.

K
w
≈0
approximation

In most practical applications, the quantities
a
,
a
0
,
K
a
, and
K
w
are either very large or very small compared to each other - for instance, for weak acids, the amount of dissociated acid
a
is much smaller than the total amount of acid
a
0
. To make use of this fact, let us write the equation (7) as
K
w
2
a
a
0
=
2
K
a
2
1-
a
a
0
-
K
a
a
0
1-
a
a
0
2
a
a
0
(
8
)
For
K
w
0
, we can simplify (8) as
0=
2
a
+
K
a
a-
K
a
a
0
. From here,
a≈
2
K
a
+4
a
0
K
a
-
K
a
2
. This formula is valid when the amount of
H
3
+
O
released after the dissociation of acid is much larger than the amount of
H
3
+
O
due to the dissociation of water:
a≈
2
K
a
+4
a
0
K
a
-
K
a
2
K
w
<<
2
K
a
+4
a
0
K
a
-
K
a
2
(
9
)
pH
can then be calculated using the formula (5). If
K
a
<<
a
0
, (9) simplifies even further into
a≈
a
0
K
a
, which is the formula that is usually used to solve weak acid in water problems. For
a
0
<<
K
a
, we can take a first-order Taylor series for the square root to see that
a≈
a
0
. Thus, we can see that the function
a[
a
0
]
behaves like a linear function near
a
0
=0
and gradually transitions into a square root function for
a
0
∞
. In the figure below, the blue line represents the value of
pH
computed directly from the chemical equilibrium equation (7). You can see that at
a
0
=0
, the
pH
is equal to 7, which agrees with experiment. However, if we don’t account for the dissociation of water, we would think that there are no hydronium ions present in the solution if no acid is added. And if
[
H
3
+
O
]
is zero, then
pH≡-Log10[
H
3
+
O
]
is infinite - and indeed, the green line goes to infinity as
a
0
0
. The orange line didn’t take the dissociation of water into account when calculating
a
(9), but did account for it when finding
[
H
3
+
O
]
(5). When computing
a
, the formula (9) acts as if the dissociation of acid is the only source of hydronium ions and thus overestimates the amount of acid that dissociates (think of Le Chatelier’s principle). The formula (5), however, then computes
[
H
3
+
O
]
and includes the contribution of water. The final answer of
[
H
3
+
O
]
is thus higher than the actual concentration, and our estimate for
pH≡-Log10[
H
3
+
O
]
ends up being smaller than the true value.
Out[]=
Actual pH
K
w
≈ 0 approximation
Water dissociation not accounted for
We can see that as
a
0
increases, the error of the approximations decreases. But how quickly does it decrease, exactly? We can answer this question by looking at the chemical equilibrium equation (7). In the approximation
K
w
≈0
, the equation (7) is solved as if the left-hand side were zero. If the left-hand side was instead some small number, we would expect
a
to be equal to the previous estimate plus some small correction:
a=
a
approx
(1-ε)
, with
ε<<1
and
a
approx
being our estimate for
K
w
≈0
(given by the formula 9). Substituting this into (7) and using the fact that
a
approx
is the solution to (7) with
K
w
=0
, we obtain
ε≈
-2
a
0
-
K
a
+
K
a
(4
a
0
+
K
a
)
-4
2
a
0
K
a
+
a
0
-5
2
K
a
+3
K
a
K
a
(4
a
0
+
K
a
)
-4
K
w
+-
K
a
+
K
a
(4
a
0
+
K
a
)

2
K
a
+2
K
w

K
w
The formula can be significantly simplified if
a
0
>>
K
a
>>
K
w
:
ε≈
K
w
2
a
0
K
a
(
10
)
Substituting this into the formula (6) for
pH
, we get that for
a
0
>>
K
a
>>
K
w
, the difference between the actual
pH
calculated from the chemical equilibrium equation (7) and the approximate formula (9) is given by
ΔpH≈
1
2Log[10]
K
w
a
0
K
a
(
11
)
Out[]=
Actual error
Predicted error
As you can see, error decreases as
1/
a
0
, which means that the more acid is added into the solution, the more accurate the approximate formula (9) becomes. This makes sense - the more acid we add, the more
H
3
+
O
is released after its dissociation, and the more negligible the amount of
H
3
+
O
contributed by water’s dissociation gets. Let’s look at the example problem from the introduction, where we needed to compute the
pH
of a
0.005
M solution of acetic acid with
K
a
=1.8·
-5
10
. Substituting these numbers into the formula (11), we get that the error in
pH
is roughly
2.4·
-8
10
. This is an incredibly small error that we probably won’t even be able to measure in an experiment. This shows that in most experiments it is appropriate to neglect the dissociation of water. In order for the error in
pH
(11) to be significant,
a
0
K
a
must be of order
-14
10
. Experimentally, this can be achieved with very weak acids, like boric acid
H
3
BO
3
with
K
a
=5.4·
-10
10
. The concentration at which the error (11) would become significant would be about
-4
10
moles per liter, which is a very small concentration. This shows that for most practical purposes, the error in
pH
obtained using the approximate formula (9) is effectively zero. Still, it would be good to improve on the accuracy of (9). Since we know pretty accurately what the error of the approximate formula (8) is, we can actually subtract it from our initial estimate to get a more precise formula:

Supplemental code

Strong acids and weak acids

Supplemental code