Previous Work and Analysis of Diprotic Titration

In the lab report written for this experiment, potentiometric titration with an autotitrator was used to determine the acid dissociation constant (Ka), equivalence points, and molar mass of unknown acids. The goal was to use the data obtained from the unknown diprotic acid to determine its identity. In this titration, two equivalence points were found for both the one corresponding to the first proton dissociation and the other to the second. The analysis of diprotic acids in these titrations involves identifying both equivalence points from the resulting titration curves and calculating the associated Ka values for each proton dissociation step and the molecular mass. The titration was conducted with 0.1 M NaOH.

library(readxl)
data <- read.csv("didat.csv")

VolVect <- data$Vol 
pHVect <- data$pH

Transforming Diprotic Data

Using the data obtained from the autotitrator, the data was able to be transformed to show the binding curve. This curve serves to show the dissociation of the two protons from unknown acid used in the experiment.

The equestion used to accomplish this was: \[ f = 2-\frac{(VA*CB)+H^+*(VI+VA)}{(VE*CB)} \] With VA being the volumes gathered for each pH. VI being the initial volume of the acid. VE being the volume at the equivalence point, and CB being the concentration of the NaOH.

The binding curve generated using this equation is as follows:

This graph shows where both protons are bound at a pH of less than 2, and where only one is bound at a pH of a little less than 3.

Binding Data Analysis through NLS and Equation Used

The binding curve was analysised using NLS or non-linear squares. This created a trend line as well as providing estimated K_a values.

The equation used for the NLS analysis was: \[ f = \frac{\frac{H}{K_a1}+\frac{2H^2}{K_a1+K_a2}}{1+\frac{H}{K_a1}+\frac{H^2}{K_a1*K_a2}} \] The resulting application is:

library (nls2)
## Loading required package: proto
tryfit <- nls2(tF ~ (H/KA1 + 2*H^2/(KA1*KA2))/(1+H/KA1 + H^2/(KA1*KA2)),
               start = c(KA1 = 0.0001, KA2 = 0.01))
summary(tryfit)
## 
## Formula: tF ~ (H/KA1 + 2 * H^2/(KA1 * KA2))/(1 + H/KA1 + H^2/(KA1 * KA2))
## 
## Parameters:
##      Estimate Std. Error t value Pr(>|t|)    
## KA1 1.731e-05  4.349e-06   3.980 0.000141 ***
## KA2 1.088e-02  1.711e-03   6.361 8.73e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2095 on 88 degrees of freedom
## 
## Number of iterations to convergence: 8 
## Achieved convergence tolerance: 3.051e-06

The resulting Ka values from NLS are:

The Ka values are determined through the procedure in for the lab were:

The two sets of Ka values are different for both protons. The lab report values are higher than the those from NLS. From the table of possible weak acids, the determined molecular mass, and the Ka values, the identity was found to be oxalic acid dihydrate. Its molar mass is 124.2 g/mol with Ka values of 5.36e-02 for Ka1 and 5.3e-05 for Ka2.

Thoughts and questions

The analysis of the data using R has shown there to be definite implications for research and industry applications. A well written program to interpret, analyze, and present the data in an easy to use manner would be integral for larger scale operation as manually analyzing the data would be too time consuming for more trials.

The use of R for student purposes has proven time consuming and finicky. The code used for one project may not work for another with the reasoning for the errors difficult to determine. R was run through Posit cloud for the purposes of this project. This leaves the question of whether other hosts would also carry the same issues. It might be interesting to see whether Python carried less bugs.