Introduction

A diprotic acid is said to dissociate in two steps, donating two protons, represented by the dissociation constants Ka1 and Ka2. These two constants express quantitatively the strength of an acid at each step of dissociation. The determination of these values is highly necessary because such acids show their buffering capacity in solution and variation of pH during titration. The dissociation constants were calculated by nonlinear square regression, a method that allows for the accurate fitting of the experimental data to the theoretical model of dissociation of a diprotic acid and, therefore, for accurate determinations of Ka1 and Ka2.

Discussion

One thing to note is that the autotitration results showed that the value of Ka1 was 2.24 X 10^-4 and that ka2 was 2.88 X 10^-8. This data is produced when the data is pluged into exel, and will differ with Ka1 being 2.23 X 10^-6 and Ka2 being 2.17 X 10^-3 in the R program. This drastic shift in data will conflict with eachother and is most likely due to the fact that both platforms are using different calculation methods.

Nls values

Ka1 = \(2.23 * 10^-6\) Ka2= \(2.17 * 10^-3\)

Converting data to find binding curve

We used the nls() function to fit the theoretical model to the experimental data to find the dissociation constants Ka1 and Ka2 from the titration data. We can do this with the folowing equation.

Diprotic Acid equation- \(Diprotic~ Fration~ Bound~ =~ 2~ - \frac{(BC~ *~ Vadd)~ +~ [H^+](Vi~ +~ Vadd)}{(BC~ *~ Ve)}\)

This function in R estimates Ka1 and Ka2 through a process of least squares minimization of the residual sum of squares between the observed and predicted pH values; it provides accurate values for these dissociation constants.

Conclusion

The titration curve and the nls analysis worked well for this diprotic acid, its dissociation constants being Ka1 and Ka2. The fitted constants gave adequate information about the behavior of the acid in solution, with two dissociation steps marking the two protons. The relative strength of the acid during each process was evident from the nature of the two values. The potency of the nls fitting method in providing accurate estimations for dissociation constants also underlines the utility of the method for titer determination.

library(readr)

data <- read.csv("Autotitration Lab.csv")

VolVect <- data$volume 
VolVect
##  [1]  0.000  0.005  0.010  0.023  0.054  0.132  0.328  0.528  0.728  0.928
## [11]  1.128  1.328  1.528  1.728  1.928  2.128  2.328  2.528  2.728  2.928
## [21]  3.129  3.329  3.529  3.729  3.929  4.129  4.329  4.529  4.729  4.929
## [31]  5.129  5.329  5.529  5.729  5.929  6.129  6.329  6.529  6.729  6.929
## [41]  7.129  7.329  7.529  7.729  7.929  8.129  8.329  8.529  8.729  8.929
## [51]  9.129  9.329  9.529  9.730  9.930 10.130 10.330 10.530 10.730 10.930
## [61] 11.130 11.330 11.530 11.730 11.930 12.130 12.330 12.530 12.730 12.930
## [71] 13.130 13.330 13.530 13.730 13.930 14.130 14.330 14.530 14.730 14.930
## [81] 15.130 15.330 15.530 15.730 15.930 16.130 16.330 16.531 16.731 16.931
## [91] 17.074 17.194 17.359 17.484
pHlev <- data$pH
pHlev
##  [1] 2.11 2.11 2.10 2.10 2.10 2.11 2.12 2.15 2.18 2.21 2.24 2.27 2.30 2.33 2.37
## [16] 2.40 2.43 2.46 2.50 2.53 2.57 2.60 2.64 2.67 2.71 2.75 2.79 2.83 2.87 2.91
## [31] 2.95 3.00 3.04 3.10 3.15 3.21 3.26 3.33 3.41 3.49 3.57 3.67 3.78 3.90 4.03
## [46] 4.16 4.29 4.41 4.51 4.61 4.69 4.77 4.84 4.90 4.96 5.02 5.07 5.13 5.18 5.22
## [61] 5.26 5.31 5.35 5.40 5.44 5.48 5.52 5.57 5.61 5.65 5.70 5.74 5.79 5.83 5.88
## [76] 5.93 5.97 6.03 6.09 6.15 6.21 6.27 6.34 6.42 6.51 6.60 6.71 6.84 6.99 7.21
## [91] 7.40 7.54 7.76 8.12
plot(VolVect,pHlev,xlab='Volume (mL)', ylab = 'pH', main= 'Titration Curve')

plot(VolVect,pHlev,xlab='Volume (mL)', ylab = 'pH', main= 'Titration Curve')

H <- 10^-(pHlev)
H
##  [1] 7.762471e-03 7.762471e-03 7.943282e-03 7.943282e-03 7.943282e-03
##  [6] 7.762471e-03 7.585776e-03 7.079458e-03 6.606934e-03 6.165950e-03
## [11] 5.754399e-03 5.370318e-03 5.011872e-03 4.677351e-03 4.265795e-03
## [16] 3.981072e-03 3.715352e-03 3.467369e-03 3.162278e-03 2.951209e-03
## [21] 2.691535e-03 2.511886e-03 2.290868e-03 2.137962e-03 1.949845e-03
## [26] 1.778279e-03 1.621810e-03 1.479108e-03 1.348963e-03 1.230269e-03
## [31] 1.122018e-03 1.000000e-03 9.120108e-04 7.943282e-04 7.079458e-04
## [36] 6.165950e-04 5.495409e-04 4.677351e-04 3.890451e-04 3.235937e-04
## [41] 2.691535e-04 2.137962e-04 1.659587e-04 1.258925e-04 9.332543e-05
## [46] 6.918310e-05 5.128614e-05 3.890451e-05 3.090295e-05 2.454709e-05
## [51] 2.041738e-05 1.698244e-05 1.445440e-05 1.258925e-05 1.096478e-05
## [56] 9.549926e-06 8.511380e-06 7.413102e-06 6.606934e-06 6.025596e-06
## [61] 5.495409e-06 4.897788e-06 4.466836e-06 3.981072e-06 3.630781e-06
## [66] 3.311311e-06 3.019952e-06 2.691535e-06 2.454709e-06 2.238721e-06
## [71] 1.995262e-06 1.819701e-06 1.621810e-06 1.479108e-06 1.318257e-06
## [76] 1.174898e-06 1.071519e-06 9.332543e-07 8.128305e-07 7.079458e-07
## [81] 6.165950e-07 5.370318e-07 4.570882e-07 3.801894e-07 3.090295e-07
## [86] 2.511886e-07 1.949845e-07 1.445440e-07 1.023293e-07 6.165950e-08
## [91] 3.981072e-08 2.884032e-08 1.737801e-08 7.585776e-09
VE <- 8.56

VI <- 25

BC <- 0.1

F <- (2-((VolVect*BC) + (H) * (VI + VolVect)) / (VE*BC))
tF <- F

plot(pHlev, tF, xlab = 'pH', ylab= 'Fraction Bound', main = "Fraction Bound vs pH")

library (nls2)
## Loading required package: proto
fitline <- nls2(tF ~ (H/KD1+2*H^2/(KD1*KD2))/(1+H/KD1+H^2/(KD1*KD2)),
               start = c(KD1 = 0.0001,KD2=0.01))


summary (fitline)
## 
## Formula: tF ~ (H/KD1 + 2 * H^2/(KD1 * KD2))/(1 + H/KD1 + H^2/(KD1 * KD2))
## 
## Parameters:
##      Estimate Std. Error t value Pr(>|t|)    
## KD1 2.228e-06  4.937e-08   45.14   <2e-16 ***
## KD2 2.165e-03  4.314e-05   50.18   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02642 on 92 degrees of freedom
## 
## Number of iterations to convergence: 8 
## Achieved convergence tolerance: 1.823e-06
lines (pHlev, predict (fitline), col = "blue")