# Rate of Reaction Graph - Gas Produced

I did a reaction and I measured the volume of gas produced against time. I need to find the rate constant of the reaction.

I am trying to plot a graph of ln(vol of gas produced) against time so that the gradient will be equal to -k so i can calculate the rate constant k. I am using the equation ln[A]t = -kt + ln[A]o

The problem is I can't plot ln0. I timed the reaction every 5 mins and gas wasn't produced until 15mins had passed. This means that the volume of gas produced for time values 0, 5 and 10 mins is 0cm^3, but ln0 doesn't exist.

How do I use my data to create a graph to calculate the rate constant?

My results were:

Time 0___5___10___15___20___25___30___35___40___45___50___55___60 ____(in mins)

Vol _0___0___0_____5___10___18____22___28___36___44___51____60____70___(in ml produced)

• What was the reaction? And what does the rest of the data look like? You can do a linear fit to get the y-intercept, or if the reaction truly didn't start until 15 minutes (weren't the reactants mixed?) then you might make 15 minutes time zero. – Fred Senese Feb 8 '15 at 23:35
• Decomposition of what? $\rm H_2O_2$, maybe? – Fred Senese Feb 8 '15 at 23:40
• The decomposition of sodium hypochlorite – user12834 Feb 8 '15 at 23:44
• One last question, was it just sodium hypochlorite and water, or did you add anything else? I mean, you were producing oxygen gas, right? – Fred Senese Feb 8 '15 at 23:58
• Yep I think so. The main problem I'm having is how to put the vol of gas produced on the graph in ln form – user12834 Feb 9 '15 at 0:04

I think the first bit of gas produced probably dissolved in the water, so you didn't see it for a little while.

You can skip your three initial "points" with zero volume, and you're not going to have $\ln(0)$, which is what's hanging you up. Note that you did this in your report, and why!

Do a linear fit with the remaining points. Your y-intercept will be $\ln \mathrm{[A]}_0$ and your slope will be $-k$. It's not a terribly good fit.

Fred Senese's post is an excellent starting point. I wanted to add that transforming data in this way is conceptually very useful but distorts parameter estimates because of unequal weighting of data point uncertainty.

The uncertainty of your "zero" data points is probably not negligible. How exactly could you read your gas measurement apparatus? To within 0.1 mL, or 1 mL, or ...? Say it was 0.1 mL, then your "zero" data point in mL is $0 \pm 0.1 \text{ mL}$. And your 70 mL data point is $70 \pm 0.1 \text{ mL}$. When you transform the data by taking the logarithm, however, the uncertainty in your data is unevenly affected. The uncertainty of $\ln \left( 0 \pm 0.1 \text{ mL} \right)$ is approximately $\ln{0.1} - \ln{0}$ which as you are discovering is infinite. The uncertainty in log-space of your 70 mL data point is $\ln{70.1} - \ln{70}$, which is 0.0014. So even though the uncertainty on each data point was the "same" before logarithms, say 0.1 mL, after transformation the uncertainty is as unequal as can be (infinity vs. 0.0014)!

Direct non-linear fitting can fit parameters to data without needing transformations. Here is some R code to do the fitting on your data. Because of the issue related to my comment, I had to include an offset parameter. (An exponential equation tends to a positive value as t approaches zero, not to zero...unless there's an offset.) This method is probably overkill for your particular problem or course, but I wanted to include it in case it's useful to other chem.se readers.

#read the data from the question into R and put it in a data frame
g <- as.numeric(str_split('_0___0___0_____5___10___18____22___28___36___44___51____60____70___', '_{1,5}')[[1]]); g <- g[!is.na(g)]
t <- as.numeric(str_split('0___5___10___15___20___25___30___35___40___45___50___55___60 ____', '___')[[1]]); t <- t[!is.na(t)]

dat <- data.frame(g = g, t = t)

# scale the data to avoid numeric problems taking the exponential of large numbers
dat$g.scaled <- dat$g/max(dat$g) dat$t.scaled <- dat$t/max(dat$t)

#compare to fitting result by neglecting first three zero points and taking logarithm
dat$ln.g[4:13] <- log(dat$g)
lm(formula = ln.g ~ t, data = dat)

# show data
dat
g  t   g.scaled   t.scaled
1   0  0 0.00000000 0.00000000
2   0  5 0.00000000 0.08333333
3   0 10 0.00000000 0.16666667
4   5 15 0.07142857 0.25000000
5  10 20 0.14285714 0.33333333
6  18 25 0.25714286 0.41666667
7  22 30 0.31428571 0.50000000
8  28 35 0.40000000 0.58333333
9  36 40 0.51428571 0.66666667
10 44 45 0.62857143 0.75000000
11 51 50 0.72857143 0.83333333
12 60 55 0.85714286 0.91666667
13 70 60 1.00000000 1.00000000

#do direct nonlinear fitting
fit <- nls(g.scaled ~ A0*exp(k*t.scaled)+offset,
data = dat, start = list(A0 = 1, k = 1, offset = 1))

#do logspace fitting to linear equation by transformation and neglecting first three data points
dat$ln.g[4:13] <- log(dat$g[4:13])
logfit <- lm(ln.g ~ t, data = dat)

#compare predicted values from fit to real data
dat$pred.scaled <- predict(fit) dat$pred <- dat$pred.scaled * max(g) dat$logpred[4:13] <- exp(predict(logfit))
require(ggplot2)
ggplot(data = dat, aes(x = t)) + geom_point(aes(y = g)) + geom_line(aes(y=pred), color = 'blue') + geom_line(aes(y=logpred), color = 'red')


The blue curve is the direct nonlinear fit and the red curve is the linear fit of log-transformed data (dropping the first three data points).

The obtained rate constant is quite different in the two cases! For the direct nonlinear fit, the rate constant is $1.4 \text{ hr}^{-1}$, and for the log-transformed data with linear fit, the rate constant is $0.053 \text{ min}^{-1}$, or $3.2 \text{ hr}^{-1}$!