You have 30mL of .2M HF being titrated with .15M KOH. The pka is 3.17....half way to the equivalence point you have 20mL of KOH. Find the pH when you add 40mL of KOH . Find the pH when you have 100mL of KOH added.

Sol:pH = pKa + log (base / acid)
= -log 3.17 + log ( .009/ .006)

Your problem is that you don't recognize what you have at this point.

If 20 mL is half-way to the equivalence point, then 40 mL must be AT the equivalence point; therefore, the pH at this point will be determined by the hydrolysis of the salt; i.e., the KF. The HH equation doesn't work at the equivalence point. (KF) = 6/(40+30) = about 0.09 but that's an estimate only.
.............F^- + HOH ==> HF + OH^-
I...........0.09...........0.....0
C...........-x.............x.....x
E.........0.09-x...........x.....x

Kb for F^- = (Kw/Ka for HF) = (x)(x)/(0.09-x)
Substitute and solve for x = (OH^-) and convert to pH.

To find the pH when you add 40 mL of KOH, you can use the Henderson-Hasselbalch equation:

pH = pKa + log(base/acid)

Given that the pKa is 3.17, and halfway to the equivalence point you have 20 mL of KOH, you need to calculate the concentration of HF and KOH at that point.

First, let's calculate the moles of HF present in the solution:

moles of HF = volume of HF (in L) * molarity of HF
= 30 mL * 0.2 M
= 6 mmol

Now, let's calculate the moles of KOH added:

moles of KOH = volume of KOH (in L) * molarity of KOH
= 20 mL * 0.15 M
= 3 mmol

Since HF and KOH react in a 1:1 ratio, the moles of HF remaining will be:

moles of HF remaining = moles of HF - moles of KOH added
= 6 mmol - 3 mmol
= 3 mmol

Now, let's calculate the concentrations of remaining HF and KOH:

concentration of HF = moles of HF remaining / volume of solution (in L)
= 3 mmol / 50 mL (since we have 30 mL of HF + 20 mL of KOH)
= 0.06 M

concentration of KOH = moles of KOH added / volume of solution (in L)
= 3 mmol / 50 mL
= 0.06 M

Using the Henderson-Hasselbalch equation:

pH = pKa + log(base/acid)
= -log(3.17) + log(0.06/0.06)
= -3.17 + log(1)
= -3.17 + 0
= -3.17

So, the pH when you add 40 mL of KOH is -3.17.

To find the pH when you have 100 mL of KOH added, you need to repeat a similar calculation.

First, let's calculate the moles of KOH added:

moles of KOH = 100 mL * 0.15 M
= 15 mmol

The moles of HF remaining will now be:

moles of HF remaining = 6 mmol - 15 mmol
= -9 mmol (since moles are negative, that means that HF has been completely consumed)

Therefore, the concentration of HF at this point is 0 M.

Using the Henderson-Hasselbalch equation:

pH = pKa + log(base/acid)
= -log(3.17) + log(0.06/0)
= -3.17 + log(infinity)
= -3.17 + infinity

Since the log of infinity is undefined, the pH is undefined when you have 100 mL of KOH added.

I hope this helps you understand how to calculate the pH in a titration. Let me know if you have any further questions!