This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
#Abstract
To identify an unknown acid by solving for its molecular weight. This was done by using the process of titration of the acid with a NaOH solution.
#introduction
Titration is a quantitative measurement of an analyte in solution by it’s complete reaction without a reagent. Titration is used in analytical chemistry to determine the amount or concentration of a substance. In a titration, one reagent (the titrant) is slowly added to a solution containing the species being measured (the analyte). As it is added, a chemical reaction occurs between the titrant and analyte. The point where all analyte is consumed, and an equal quantity of titrant and analyte are present, it is called the equivalence-point. This is determined by one type of indicator that it is also present in the solution, or by a measurable physical change in the solution, like pH, electrode potential, conductivity, or light absorption (color). In practice, an abrupt change of this physical property signals the end of titration, called the endpoint. The purpose of titration (also called volumetric analysis) is to determine the analyte quantity or concentration, the titrant concentration being known beforehand. Titrations are based on chemical reactions, and these reactions must fulfill four requirements: • The reaction must be fast, so that after the titrant’s addition, the reaction occurs within approximately one second • The reaction must go to completion • The reaction must have well-known stoichiometry (reaction ratios) • A convenient method of endpoint detection must be available
#monoprodic
Mydata <- read.csv("titration.csv")
volume<- Mydata$vol..Lm.
volume
pH<- Mydata$pH
pH
length(volume)
length(pH)
plot(volume, pH, main = "titration Curve", xlab = "Volume of Base", ylab = "pH")
H <- 10^-(pH)
CB <- 0.01
Vadd <- volume
Vini <- 25
Vend <- 20
fb <- 1 - (CB * Vadd + H * (Vini+Vadd)) / ( CB*Vend)
fb
plot(pH,fb)
library(nls2)
fit <- nls2(fb ~ H/(KD+H), start=c(KD=0.0001))
summary(fit)
lines(pH,predict(fit), col="red")
#diprodic
vol(d) <- read.csv("data4.csv")
vol(d)
pH(d) <- read.csv("data3.csv")
pH(d)
length(vol(d))
volVect <- vol$Volume.mL.
length(volVect)
pHVect <- pH$pH
length(pHVect)
H <- 10^-(pHVect)
H
VE <- 7.905
VI <- 25
CB <- 0.10
CB
VA<- volVect
F <- (2-(((VA*CB)+((H)*(VI+VA)))/(VE*CB)))
F
tF <- F
length(pHVect)
length(F)
plot(pHVect,F)
library(nls2)
fit(d) <- nls2(tF ~ (H/KD1+2*H^2/(KD1*KD2))/(1+H/KD1+H^2/(KD1*KD2)),
start = c(KD1=0.0001,KD2=0.01))
fit(d)
length((predict(fit(d))))
plot(pHVect,F)
lines(pHVect,predict(fit(d)), col="blue")