Diprotic Acid

A diprotic acid is an acid which can release two hydrogens in the presence of a base. The release of the two hydrogens causes the graph of pH vs volume of NaOH added to have to points of sharp increases in pH which means there will be two ka values at two different volumes. In this experiment the acid used was unknown but after figuring out the volume of NaOH at the second equivalence point it became possible to calculate the molar mass of the unknown acid. The unknown acid had a molar mass of 95 g/mol which is extremely close the molar mass of oxalic acid.The fraction bound vs pH also showed a steady decrease as the pH increased and more base was added which indicates the continued dissociation of the acid as the pH became greater.

##Diprotic Acid
Mydata <- read.csv("Book10.csv")
Mydata
##      pH Volume
## 1  3.04  5.044
## 2  3.08  5.244
## 3  3.13  5.444
## 4  3.18  5.644
## 5  3.23  5.844
## 6  3.29  6.044
## 7  3.36  6.244
## 8  3.40  6.444
## 9  3.48  6.644
## 10 3.54  6.844
## 11 3.62  7.044
## 12 3.71  7.244
## 13 3.82  7.444
## 14 3.94  7.645
## 15 4.06  7.845
## 16 4.19  8.045
## 17 4.31  8.245
## 18 4.44  8.445
## 19 4.55  8.645
## 20 4.64  8.845
## 21 4.73  9.045
## 22 4.80  9.245
## 23 4.87  9.445
## 24 4.93  9.645
## 25 4.99  9.845
## 26 5.05 10.045
## 27 5.10 10.245
## 28 5.17 10.445
## 29 5.22 10.645
## 30 5.27 10.845
## 31 5.31 11.045
## 32 5.35 11.245
## 33 5.40 11.445
## 34 5.44 11.645
## 35 5.50 11.845
## 36 5.52 12.045
## 37 5.57 12.245
## 38 5.61 12.445
## 39 5.65 12.645
## 40 5.68 12.845
## 41 5.74 13.045
## 42 5.78 13.245
## 43 5.81 13.445
## 44 5.87 13.645
## 45 5.91 13.845
## 46 5.95 14.045
## 47 5.99 14.245
## 48 6.04 14.446
## 49 6.09 14.646
## 50 6.13 14.846
## 51 6.19 15.046
## 52 6.24 15.246
## 53 6.30 15.446
## 54 6.37 15.646
## 55 6.44 15.846
## 56 6.51 16.046
## 57 6.59 16.246
## 58 6.67 16.446
volume <- Mydata$Vol ## Volume vector
pH <- Mydata$pH      ## pH vector

plot(volume,pH,main="Volume of NaOH vs. pH of Solution",xlab="Volume (mL)",
     ylab="pH")

H <- 10^-(pH)    ## H+ from pH

Vini <- 25           ## Initial Volume

Vend <- 8.245         ## Volume added in endpoint

tbase <- 0.10        ## [Base]

Fb <- (2-(((volume*tbase)+((H)*(Vini+volume)))/(Vend*tbase)))

plot(pH,Fb)

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

length(predict(fit))
## [1] 58
plot(pH,Fb,main="Fraction Bound vs pH")

lines(pH,predict(fit),col="blue")

##Monoprotic Acid

Monoprotic acids are diffrent from diprotic acids these acids can only release one hydrogen in the presence of a base so they will only have one ka value. In the case of this acetic acid was titrated using NaOH. for this experiment a fraction bound vs pH graph was created which shows how the greater the pH became due to the increasing volume of NaOH the more dissociated the acid became making the hydrogen bound to the acid decrease.

##Monoprotic Acid
Mydata<-read.csv("Book5.csv")
Mydata
##     Vol    pH
## 1   0.0 3.031
## 2   5.0 4.210
## 3  10.0 4.650
## 4  15.0 5.100
## 5  18.0 5.460
## 6  19.0 5.670
## 7  20.0 5.950
## 8  21.0 6.600
## 9  21.4 7.110
## 10 21.6 8.650
volume<-Mydata$Vol
pH<-Mydata$pH
volume
##  [1]  0.0  5.0 10.0 15.0 18.0 19.0 20.0 21.0 21.4 21.6
pH
##  [1] 3.031 4.210 4.650 5.100 5.460 5.670 5.950 6.600 7.110 8.650
plot(volume,pH,main="Volume of NaoH vs PH of Solution",xlab="Volume (mL)", ylab = "pH",xlim = c(0,25),ylim=c(3,12))

OH<-0.1
Veq<-21.5
H <- 10^(-pH)
Vi<-25
H
##  [1] 9.311079e-04 6.165950e-05 2.238721e-05 7.943282e-06 3.467369e-06
##  [6] 2.137962e-06 1.122018e-06 2.511886e-07 7.762471e-08 2.238721e-09
fb<-1-(OH*volume+H*(Vi+volume))/(OH*Veq)
plot(pH,fb,main="Fraction Bound vs pH",xlab = "pH",xlim = c(3,7.11),ylab = "Fraction Bound")
library(nls2)
tryfit<-nls2(fb~(H/(KA+H)),start=c(KA=.0001))
summary(tryfit)
## 
## Formula: fb ~ (H/(KA + H))
## 
## Parameters:
##     Estimate Std. Error t value Pr(>|t|)    
## KA 1.856e-05  4.049e-07   45.83 5.61e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.008909 on 9 degrees of freedom
## 
## Number of iterations to convergence: 7 
## Achieved convergence tolerance: 4.818e-07
lines(pH,predict(tryfit),col="blue")