This data compares and contrasts two essential graphical representations, namely the binding curve and the titration curve, for the acid-base reaction between acetic acid and sodium hydroxide (NaOH). Both curves depict the pH changes during the titration process, yet they highlight different aspects of the reaction. The binding curve showcases the binding affinity between the acid and base, emphasizing the equivalence point where the acid and base are stoichiometrically balanced. In contrast, the titration curve illustrates the pH changes as the titrant (NaOH) is added incrementally to the analyte (acetic acid solution), revealing characteristic regions such as the initial buffer region, steep slope region, and the equivalence point. In the diprotic titration scenario with an unknown diprotic acid and NaOH as the base, the binding curve would still depict the binding affinity between the acid and base, showcasing two equivalence points corresponding to the two dissociation steps of the diprotic acid.

Binding Curve for Acid Base Titration: Acetic Acid and NaOH

#   install.packages("readr")

#  library(readr)



#This code below is for trial 2 data

mydata <- read.csv("titration_trial2_data.csv")


ph <-mydata$ph

volume <- mydata$Vadd

length(volume)
## [1] 24
length(ph)
## [1] 24
volume
##  [1]  0.0  3.0  5.0  7.0  9.0 11.0 13.0 15.0 17.0 19.0 19.4 19.6 19.8 20.2 20.6
## [16] 21.0 21.4 21.8 22.2 22.6 23.0 25.0 27.0 29.0
ph
##  [1]  3.010  3.533  3.863  4.087  4.322  4.543  4.674  4.953  5.353  6.046
## [11]  6.770  6.984  7.577  9.000 10.000 10.543 10.777 10.937 11.074 11.179
## [21] 11.216 11.419 11.544 11.788
plot(volume, ph, main = "Titration Curve for Trial 2", xlab = "volume of NaOH", ylab = "ph", pch = 20, col = "turquoise")

#   Binding curve from titration data
mydata <- read.csv("titration_trial2_data.csv")

H  <-  10^-(ph)

CB <-  0.01   #  base conc

Vadd <-  volume

Vini <-  25    # initial volume of base

Vend <-  20.1  #   estimated  

#   fraction bound =  1 -  [  CB x Vadd + [H+] x (Vini + Vadd)] / (CB *  Vend)  

fb <-   1 -  (CB * Vadd + H * (Vini + Vadd)) / (CB *  Vend)  

fb
##  [1]  0.878453082  0.809917905  0.730782859  0.638711008  0.544179774
##  [6]  0.447606447  0.349228969  0.251513842  0.153301912  0.054529463
## [11]  0.034788357  0.024852600  0.014919470 -0.004975349 -0.024875645
## [16] -0.044776126 -0.064676621 -0.084577117 -0.104477614 -0.124378111
## [21] -0.144278608 -0.243781095 -0.343283583 -0.442786070
plot(ph,fb,xlim=c(3,10),main="Binding Analysis of Monoprotic Titration")

library(nls2)
## Loading required package: proto
fit <- nls2(fb ~ H/(KD+H), start=c(KD=0.0001))

summary(fit)  
## 
## Formula: fb ~ H/(KD + H)
## 
## Parameters:
##     Estimate Std. Error t value Pr(>|t|)    
## KD 4.084e-05  1.048e-05   3.895 0.000729 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1409 on 23 degrees of freedom
## 
## Number of iterations to convergence: 7 
## Achieved convergence tolerance: 1.944e-06
lines(ph,predict(fit), col="red")

Summary of nls2 for Monoprotic titration: Formula: FB ~ (H/KD1 + (2 * H^2)/(KD1 * KD2))/(1 + H/KD1 + H^2/(KD1 * KD2))

Parameters: Estimate Std. Error t value Pr(>|t|)
KD1 3.549e-07 1.940e-08 18.30 <2e-16 KD2 1.158e-02 5.382e-04 21.51 <2e-16 — Signif. codes:
0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.061 on 95 degrees of freedom

Number of iterations to convergence: 9 Achieved convergence tolerance: 1.801e-06

Traditional titration analysis and binding curve analysis are both methods used to study chemical reactions, particularly those involving complex formation or equilibrium. Here’s a comparison of the two methods:

Traditional Titration Analysis:

Pros: 1. Direct Measurement: Titration directly measures the quantity of reactant or product present in the solution. 2. Versatility: It can be applied to a wide range of chemical reactions, including acid-base, redox, and complex formation reactions.

Cons:

  1. Requires Endpoint Detection: Endpoint detection can be subjective and may introduce errors, especially in complex systems. 2.Cannot Distinguish Between Different Species: Titration measures the total concentration of a species without distinguishing between different forms (e.g., protonated and deprotonated forms in acid-base reactions).

Binding Curve Analysis:

Pros:

  1. Visualization of Binding Process: Graphical representation of binding curves allows for easy visualization of the binding process and determination of key parameters.
  2. Ability to Study Multiple Species: Binding curves can distinguish between different species involved in the reaction (e.g., bound and unbound forms) and provide insights into their relative concentrations.

Cons: 1. Assumes Equilibrium: Binding curve analysis assumes that the system reaches equilibrium, which may not always be the case, especially in kinetic or non-equilibrium systems.

In summary, traditional titration analysis is more versatile and straightforward but provides limited information, while binding curve analysis offers detailed insights into complex formation reactions but requires more sophisticated data interpretation techniques. The choice between the two methods depends on the specific goals of the study and the nature of the chemical system being investigated.

Diprotic Acid Analysis

In the context of a diprotic acid titration, the fraction bound formula reflects the equilibrium between the acid (HA) and its conjugate base (A⁻) as it reacts with a base (B⁻).

In an acid-base titration, diprotic acids have two acidic hydrogen ions (H⁺) to donate per molecule, while monoprotic acids have only one. When calculating the fraction bound for a diprotic acid, you’re considering how many of the available hydrogen ions are bound to the base. Since there are two hydrogen ions available, you subtract the fraction bound from 2. For monoprotic acids, with only one hydrogen ion available, you subtract the fraction bound from 1. This reflects the difference in the number of acidic hydrogen ions available for reaction in each case.

The acid can undergo two successive ionization steps, each corresponding to a dissociation constant (Ka1 and Ka2). The fraction bound formula accounts for these two ionization events and the subsequent binding of the base (B⁻) to the acid species.

Data <- read.csv("diprotic.csv")

Data
##      pH consumption
## 1  1.84       0.000
## 2  1.84       0.005
## 3  1.85       0.010
## 4  1.85       0.023
## 5  1.85       0.054
## 6  1.85       0.132
## 7  1.86       0.328
## 8  1.88       0.528
## 9  1.89       0.728
## 10 1.91       0.928
## 11 1.93       1.128
## 12 1.94       1.328
## 13 1.96       1.528
## 14 1.99       1.728
## 15 2.02       1.928
## 16 2.04       2.128
## 17 2.06       2.328
## 18 2.08       2.528
## 19 2.11       2.728
## 20 2.14       2.928
## 21 2.18       3.129
## 22 2.19       3.329
## 23 2.24       3.529
## 24 2.26       3.729
## 25 2.30       3.929
## 26 2.33       4.129
## 27 2.37       4.329
## 28 2.42       4.529
## 29 2.47       4.729
## 30 2.54       4.929
## 31 2.60       5.129
## 32 2.64       5.329
## 33 2.70       5.529
## 34 2.82       5.729
## 35 2.91       5.929
## 36 3.04       6.129
## 37 3.23       6.329
## 38 3.48       6.529
## 39 3.65       6.639
## 40 3.84       6.733
## 41 4.00       6.807
## 42 4.16       6.885
## 43 4.34       6.977
## 44 4.55       7.078
## 45 4.67       7.163
## 46 4.86       7.336
## 47 5.05       7.536
## 48 5.18       7.736
## 49 5.28       7.936
## 50 5.39       8.136
## 51 5.48       8.337
## 52 5.57       8.537
## 53 5.63       8.737
## 54 5.69       8.937
## 55 5.75       9.137
## 56 5.81       9.337
## 57 5.82       9.537
## 58 5.92       9.737
## 59 5.96       9.937
## 60 5.97      10.137
## 61 6.07      10.337
## 62 6.10      10.537
## 63 6.15      10.737
## 64 6.19      10.937
## 65 6.23      11.137
## 66 6.28      11.337
## 67 6.33      11.537
## 68 6.38      11.737
## 69 6.43      11.937
## 70 6.44      12.137
## 71 6.53      12.337
## 72 6.58      12.537
## 73 6.63      12.737
## 74 6.71      12.937
## 75 6.78      13.137
## 76 6.78      13.337
## 77 6.90      13.537
## 78 7.00      13.737
## 79 7.01      13.937
## 80 7.18      14.137
## 81 7.20      14.337
## 82 7.49      14.537
## 83 7.60      14.615
## 84 7.61      14.775
## 85 8.22      14.975
## 86 8.41      14.993
## 87 8.44      14.998
## 88 8.46      15.012
## 89 8.54      15.044
## 90 8.75      15.082
## 91 8.81      15.097
## 92 8.93      15.137
## 93 9.12      15.213
## 94 9.27      15.303
## 95 9.49      15.467
## 96 9.71      15.639
## 97 9.83      15.799
Volume <-Data$consumption

Volume
##  [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.639  6.733
## [41]  6.807  6.885  6.977  7.078  7.163  7.336  7.536  7.736  7.936  8.136
## [51]  8.337  8.537  8.737  8.937  9.137  9.337  9.537  9.737  9.937 10.137
## [61] 10.337 10.537 10.737 10.937 11.137 11.337 11.537 11.737 11.937 12.137
## [71] 12.337 12.537 12.737 12.937 13.137 13.337 13.537 13.737 13.937 14.137
## [81] 14.337 14.537 14.615 14.775 14.975 14.993 14.998 15.012 15.044 15.082
## [91] 15.097 15.137 15.213 15.303 15.467 15.639 15.799
pH <- Data$pH

pH
##  [1] 1.84 1.84 1.85 1.85 1.85 1.85 1.86 1.88 1.89 1.91 1.93 1.94 1.96 1.99 2.02
## [16] 2.04 2.06 2.08 2.11 2.14 2.18 2.19 2.24 2.26 2.30 2.33 2.37 2.42 2.47 2.54
## [31] 2.60 2.64 2.70 2.82 2.91 3.04 3.23 3.48 3.65 3.84 4.00 4.16 4.34 4.55 4.67
## [46] 4.86 5.05 5.18 5.28 5.39 5.48 5.57 5.63 5.69 5.75 5.81 5.82 5.92 5.96 5.97
## [61] 6.07 6.10 6.15 6.19 6.23 6.28 6.33 6.38 6.43 6.44 6.53 6.58 6.63 6.71 6.78
## [76] 6.78 6.90 7.00 7.01 7.18 7.20 7.49 7.60 7.61 8.22 8.41 8.44 8.46 8.54 8.75
## [91] 8.81 8.93 9.12 9.27 9.49 9.71 9.83
H <- 10^(-pH)

H
##  [1] 1.445440e-02 1.445440e-02 1.412538e-02 1.412538e-02 1.412538e-02
##  [6] 1.412538e-02 1.380384e-02 1.318257e-02 1.288250e-02 1.230269e-02
## [11] 1.174898e-02 1.148154e-02 1.096478e-02 1.023293e-02 9.549926e-03
## [16] 9.120108e-03 8.709636e-03 8.317638e-03 7.762471e-03 7.244360e-03
## [21] 6.606934e-03 6.456542e-03 5.754399e-03 5.495409e-03 5.011872e-03
## [26] 4.677351e-03 4.265795e-03 3.801894e-03 3.388442e-03 2.884032e-03
## [31] 2.511886e-03 2.290868e-03 1.995262e-03 1.513561e-03 1.230269e-03
## [36] 9.120108e-04 5.888437e-04 3.311311e-04 2.238721e-04 1.445440e-04
## [41] 1.000000e-04 6.918310e-05 4.570882e-05 2.818383e-05 2.137962e-05
## [46] 1.380384e-05 8.912509e-06 6.606934e-06 5.248075e-06 4.073803e-06
## [51] 3.311311e-06 2.691535e-06 2.344229e-06 2.041738e-06 1.778279e-06
## [56] 1.548817e-06 1.513561e-06 1.202264e-06 1.096478e-06 1.071519e-06
## [61] 8.511380e-07 7.943282e-07 7.079458e-07 6.456542e-07 5.888437e-07
## [66] 5.248075e-07 4.677351e-07 4.168694e-07 3.715352e-07 3.630781e-07
## [71] 2.951209e-07 2.630268e-07 2.344229e-07 1.949845e-07 1.659587e-07
## [76] 1.659587e-07 1.258925e-07 1.000000e-07 9.772372e-08 6.606934e-08
## [81] 6.309573e-08 3.235937e-08 2.511886e-08 2.454709e-08 6.025596e-09
## [86] 3.890451e-09 3.630781e-09 3.467369e-09 2.884032e-09 1.778279e-09
## [91] 1.548817e-09 1.174898e-09 7.585776e-10 5.370318e-10 3.235937e-10
## [96] 1.949845e-10 1.479108e-10
plot(Volume,pH,main="Volume of NaOH vs. pH In Diprotic Titration",xlab = "Volume of NaOH (mL)",ylab="pH",pch = 20, col = "turquoise")

Vinital <- 25.00

Vadd <- Volume

Vend <- 15.799/2

CB <- 0.100

FB <-  2 -(CB * Vadd + H * (Vinital + Vadd)) / (CB *  Vend) 

FB
##  [1]  1.542553e+00  1.541829e+00  1.551521e+00  1.549643e+00  1.545165e+00
##  [6]  1.533896e+00  1.515889e+00  1.507153e+00  1.488270e+00  1.478721e+00
## [11]  1.468603e+00  1.449224e+00  1.438352e+00  1.435020e+00  1.430394e+00
## [16]  1.417418e+00  1.403991e+00  1.390129e+00  1.382192e+00  1.373226e+00
## [21]  1.368635e+00  1.347038e+00  1.345443e+00  1.328087e+00  1.319085e+00
## [26]  1.304834e+00  1.293612e+00  1.284555e+00  1.273834e+00  1.266769e+00
## [31]  1.254914e+00  1.237446e+00  1.222972e+00  1.215887e+00  1.201277e+00
## [36]  1.188189e+00  1.175457e+00  1.160276e+00  1.150601e+00  1.141861e+00
## [41]  1.134273e+00  1.125633e+00  1.114929e+00  1.102849e+00  1.092363e+00
## [46]  1.070769e+00  1.045648e+00  1.020424e+00  9.951606e-01  9.698905e-01
## [51]  9.444770e-01  9.191844e-01  8.938805e-01  8.685749e-01  8.432677e-01
## [56]  8.179591e-01  7.926422e-01  7.673375e-01  7.420238e-01  7.167066e-01
## [61]  6.913981e-01  6.660824e-01  6.407680e-01  6.154526e-01  5.901370e-01
## [66]  5.648217e-01  5.395062e-01  5.141904e-01  4.888743e-01  4.635566e-01
## [71]  4.382416e-01  4.129250e-01  3.876083e-01  3.622920e-01  3.369753e-01
## [76]  3.116572e-01  2.863411e-01  2.610243e-01  2.357063e-01  2.103898e-01
## [81]  1.850719e-01  1.597553e-01  1.498816e-01  1.296272e-01  1.043101e-01
## [86]  1.020316e-01  1.013986e-01  9.962638e-02  9.557552e-02  9.076515e-02
## [91]  8.886631e-02  8.380271e-02  7.418187e-02  6.278876e-02  4.202796e-02
## [96]  2.025444e-02 -7.639236e-09
tF <- FB

length(pH)
## [1] 97
length(FB)
## [1] 97
# Load required library
library(nls2)

# Read the data
Data <- read.csv("diprotic.csv")

# Extract variables
Volume <- Data$consumption
pH <- Data$pH

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

# Define the formula for the model
formula <- FB ~ (L / KD1) + 2 * L^2/((KD1 * KD2)) / (1 + L / (KD1 + L^2/(KD1 * KD2)))





# Extract fitted values
fitted_values <- fitted(fit)
predict(fit)
##  [1] 9.598886e-01 8.777083e-01 7.704850e-01 6.671389e-01 5.384652e-01
##  [6] 4.122417e-01 3.415612e-01 2.143728e-01 9.798649e-02 2.155216e-02
## [11] 4.141435e-03 2.534260e-03 6.481441e-04 2.448739e-05 2.448793e-06
## [16] 7.013792e-07 4.092164e-07 2.831086e-07 2.065157e-07 1.621635e-07
## [21] 1.489200e-07 9.331536e-08 6.997665e-08 3.989819e-08
# Plot original data
plot(pH, FB, main = "Fraction Bound vs. pH of Diprotic Acid", xlim = c(2, 8), ylim = c(0.0, 2.0), xlab = "pH", ylab = "Fraction Bound")

fit <- nls2(FB ~ (H/KD1+(2*H^2)/(KD1*KD2))/(1+H/KD1+H^2/(KD1*KD2)), start=c(KD1=0.000001,KD2=0.0001))

summary(fit)
## 
## Formula: FB ~ (H/KD1 + (2 * H^2)/(KD1 * KD2))/(1 + H/KD1 + H^2/(KD1 * 
##     KD2))
## 
## Parameters:
##      Estimate Std. Error t value Pr(>|t|)    
## KD1 3.549e-07  1.940e-08   18.30   <2e-16 ***
## KD2 1.158e-02  5.382e-04   21.51   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.061 on 95 degrees of freedom
## 
## Number of iterations to convergence: 9 
## Achieved convergence tolerance: 1.801e-06
lines(pH,predict(fit),col="blue")

Here is a summary of values/parameters for the diprotic data. KD1 refers to the dissociation constant for the first dissociation step of the diprotic acid, while KD2 refers to the dissociation constant for the second dissociation step. These constants help quantify the extent to which the acid dissociates in solution.

Formula: FB ~ (H/KD1 + (2 * H^2)/(KD1 * KD2))/(1 + H/KD1 + H^2/(KD1 * KD2))

Parameters: Estimate Std. Error t value Pr(>|t|)
KD1 3.549e-07 1.940e-08 18.30 <2e-16 KD2 1.158e-02 5.382e-04 21.51 <2e-16 — Signif. codes:
0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.061 on 95 degrees of freedom

Number of iterations to convergence: 9 Achieved convergence tolerance: 1.801e-06