Step 1: Initial pH of the solution.
The given solution is a weak acid \( HA \) with a dissociation constant \( K_a = 5 \times 10^{-4} \). The initial concentration of the acid is 0.2 M, and we need to calculate its initial pH.
The ionization of a weak acid in water is given by:
\[
HA \rightleftharpoons H^+ + A^-
\]
Using the expression for the dissociation constant:
\[
K_a = \frac{[H^+][A^-]}{[HA]}
\]
Let the concentration of \( H^+ \) and \( A^- \) at equilibrium be \( x \). Then:
\[
K_a = \frac{x^2}{[HA] - x}
\]
Assuming \( x \) is much smaller than 0.2 M, we approximate \( [HA] - x \approx 0.2 \):
\[
K_a = \frac{x^2}{0.2}
\]
Substituting \( K_a = 5 \times 10^{-4} \):
\[
5 \times 10^{-4} = \frac{x^2}{0.2}
\]
Solving for \( x \):
\[
x^2 = (5 \times 10^{-4}) \times 0.2 = 1 \times 10^{-4}
\]
\[
x = 10^{-2} \, \text{M}
\]
The concentration of \( H^+ \) is \( 10^{-2} \, \text{M} \), so the pH is:
\[
\text{pH} = -\log[H^+] = -\log(10^{-2}) = 2
\]
Step 2: Final pH after titration.
The titration involves adding NaOH, which will neutralize the acid. The initial moles of HA are:
\[
\text{Moles of HA} = 0.2 \, \text{M} \times 0.02 \, \text{L} = 4 \times 10^{-3} \, \text{mol}
\]
The moles of NaOH added are:
\[
\text{Moles of NaOH} = 0.2 \, \text{M} \times 0.01 \, \text{L} = 2 \times 10^{-3} \, \text{mol}
\]
After neutralization, the remaining moles of HA are:
\[
4 \times 10^{-3} - 2 \times 10^{-3} = 2 \times 10^{-3} \, \text{mol}
\]
The volume of the solution after titration is:
\[
\text{Total volume} = 20 \, \text{ml} + 10 \, \text{ml} = 30 \, \text{ml} = 0.03 \, \text{L}
\]
The concentration of HA remaining is:
\[
\frac{2 \times 10^{-3}}{0.03} = 0.067 \, \text{M}
\]
Now, the pH can be calculated again using the same procedure as for the initial pH, resulting in a final pH of 3.3.
Step 3: Conclusion.
The initial pH is 2 and the final pH is 3.3.
Final Answer: 2, 3.3