% SIMIODETemplate-TeacherORStudent.tex and simiode.cls for LaTeX2e
% Version 29 July 2015.
%
% This class (simiode.cls) is a modification of that used by
% the journal PRIMUS - Problems, Resources, and Issues in
% Mathematics Undergraduate Studies.
%
% See http://www.tandfonline.com/loi/upri .
%
% The class was developed by  Marc Frantz with suggestions of the
% PRIMUS Editorial Board, especially John Thoo.
%
% This template is to be used with the  class file "simiode.cls".
%
% The latest version of this class and template files
% can be found at
%
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
%
\documentclass{simiode}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Basically the Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review (but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.
% Rename the pdf after you compile each final version.
% This option was created  by Eric Sullivan, Carroll College, Helena MT.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NOTE regarding double spacing %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Manuscripts should be submitted doubled spaced.  This is
% accomplished via the \baselinestretch command below.
% However, you may obtain an idea of how your article will
% look in final form, so that you can better plan your
% presentation.  To see your manuscript formatted very
% similarly to the on-line published format of  SIMIODE,
% comment the following line out by inserting a percent sign % (%) at its beginning.

\renewcommand{\baselinestretch}{1.3}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NOTE regarding macros %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Any macros defined for your paper should be contained in
% the top matter. Likewise, any environment definitions such
% as \newtheorem or \newenvironment should also go in the
% top matter.
%
% Do not \input your macros as separate files within your
% final version because more files make it harder for the
% editors and users to keep track of and/or modify and
% append your paper.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Top matter is above and
% the beginning of the document below.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\newpage



\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\CHEMICAL REACTION DATA COLLECTION}


\markboth{Chemical Reaction Data Collection}{Chemical Reaction Data Collection}






\author{Brian Winkel,
Director SIMIODE\\
Chardon OH 44024 USA\\
BrianWinkel@simiode.org
}

\makeStitlePDFLaTex


\begin{abstract}
 We present a situation in which a chemistry graduate student is assigned the  task of collecting data on a chemical reaction and does a poor job of collecting the data. Indeed, he only collects the data at the start and end of a number of three minute intervals and does not keep track of when the observations are made. The student is asked to completely recover information on the reaction, including rate of reaction and extraction constant.
\end{abstract}



\section*{SCENARIO DESCRIPTION}
Alex and Hayden had known each other all their lives, having both parents buying houses next to each other before they were born.  They did chemistry merit badge in scouts and went to the same undergraduate schools and now were in the same chemistry PhD program with the same advisor - almost twins. However, each was different from the other - one into sports, the other classical music; one lived off pizza and burgers, the other was a strict vegetarian; one into on-line action games, the other into everything FaceBook and Tweeting all the time.

So while they took turns on the late shift in their professor's lab, sometimes they just hung out for the evening - Alex calling out for pizza and Hayden doing his tofu salad.  This Thursday night their professor, Alyson, wanted to see if they could figure out how to back out parameters from a reaction. She said to them, ``Ok. Here's what we're gonna do. I have compound A in this beaker and it decomposes slowly in the presence of catalyst Y. At 5:00 PM you are going to dump a fixed amount of A (in ng) into this large beaker and at the same time add a large amount of catalyst as well as begin a continuous stream of A (in ng) into the beaker.  I want you to collect data on the amount of ng of A in the beaker using the MicroTell Reader, record it, form a mathematical model, and back out the parameters. 

``No more than 8 hours of data collection ought to do it and since our AutoCollect device is in the shop I ask you to do it the old fashion way, sample at reasonable time intervals and just record the amount of compound A that the MicroTell Reader tells you.'' She said all this to them as she left at 4:30 PM for the day; she did this every day, exactly at 4:30 PM.  
 
Alex and Hayden  chatted about a few things, then returned to their favorite activities - Alex doing on-line gaming and Hayden doing FaceBook. Suddenly, Hayden jumped up and said, ``Gotta go for a bit. Start without me and I'll be back to finish. I am going to Wally's.'' (Wally's was a favorite vegetarian hangout near the campus).  Whoosh, he was off. No consultation, no hint of his ideas on data collection, the model, the parameters, etc. Just gone!!

So Alex concocted this scheme which fit just right with his gaming strategy of ``think fast and act faster'' - hey, it got him campus Union Board championship last year!  He would collect data every three minutes. By then Hayden would be back and they could mid-course correct if they needed to do something different. Hayden did not call back. Indeed, when Alex did get hold of him about an hour into the run he got, ``Don't bother me now. I met this girl!''  Later there was no answer on his cell phone.  Hmmmmm!

We offer Alex's data pairs of amount of compound A at some point in time and then the amount of compound A exactly 3 minutes later, but never with any time of observations recorded. Would you believe?

Your job is to help him recover all his professor wanted him to do.

\begin{enumerate}
\item From the data offered in pairs, the amount of compound A in ng as first element of pair and the amount of compound A in ng exactly 3 minutes later as the second element of pair - but with no times offered - formulate a kinetic model of the reaction with the extraction. His professor believes it is either a first order or second order reaction with a constant stream of additional compound A coming in.  She did not tell them at what rate, i.e., ng compound A/minute, the stream was, but she did say that the original amount of compound A in the beaker solution was 80.82 ng.
\item Confirm your model, estimate your parameters, and use your model to determine exactly when Alex did take these observations so he can  fill in his data log on the experiment for his laboratory based studies.
\item Offer up some advice for Alex so that he has a better chance at success in graduate school.
\end{enumerate}

\subsection*{Alex's Data}

Here is Alex's data of the amount of compound A in ng in the beaker with data pairs for initial observation as first element in each pair and data for the observation made 3 minutes later as second element of each pair. There is no recorded data as to when he made these observations.  However, as absent-minded and irresponsible as he was in recording time data, he was very diligent in noting that all data pairs are 3 minutes apart!

\begin{table}[h]
\begin{center}
\begin{tabular}{|c|c|} \hline
\multicolumn{1}{|c|}{ng of Compound A at Start} & \multicolumn{1}{|c|}{ng of Compound A at End} \\
\multicolumn{1}{|c|}{ of 3 Minute Interval} & \multicolumn{1}{|c|}{ of 3 Minute Interval} \\ \hline
80.82 & 93.29\\ \hline
143.24 & 155.48\\ \hline
227.14 & 238.88\\ \hline
303.84 & 314.91\\ \hline
387.60 & 397.74\\ \hline
465.94 & 474.99\\ \hline
503.28 & 511.74\\ \hline
517.58 & 525.81\\ \hline
549.79 & 557.46\\ \hline
595.05 & 601.90\\ \hline
627.01 & 633.25\\ \hline
664.33 & 669.78\\ \hline
673.80 & 679.05\\ \hline
695.15 & 699.93\\ \hline
730.42 & 734.41\\ \hline
737.34 & 741.17\\ \hline
746.11 & 749.73\\ \hline
774.98 & 777.89\\ \hline
795.67 & 798.07 \\ \hline
\end{tabular}
\end{center}
\end{table}

\teacher{

\section*{NOTES FOR TEACHERS}
This problem is a variant of the Oil Slick model \cite{Winkel2014} with more narrative and a different context. Basically the approach is to compute an approximation from the data of the derivative and plot that against the function at respective intervals, thus obtaining a 
 differential equation of the form, 

\begin{equation}\label{eq:form1}
y'(t) = - a y(t) + b\, , 
\end{equation}
indicating a first order reaction with some addition due to infusion of compound A

\vspace*{.3 true cm}

\noindent OR a 
 differential equation of the form, 

  \vspace*{.3 true cm}

\begin{equation}\label{eq:form2}
y'(t) = - a y(t)^2 + b\, , 
\end{equation}
indicating a second order reaction with some addition due to infusion of compound A.

Students have no {\it  a priori\/} notions of the order of the reaction and will, no doubt, go through the check to confirm or reject the hypothesis that it is first order - which it is not!

Thus, moving on to second order model, after (\ref{eq:form2}) is built with parameters determined from the nonlinear regression of $y'(t)$ on $y(t)$ from (\ref{eq:form2}) then the differential equation with these parameters is solved.


From here the time of observations can be found   by setting the solution as a function of time, $y(t)$, in minutes from the start of the reaction equal to the observed amounts of compound A in ng. The kinetic rate constant ($a$ in 1/(min*ng of compound A)) and the infusion rate ($b$ in ng/min)  can be picked off and the times of observations can be examined to see the 3 minute (approximately) intervals given when the times of the pairs of observations are differenced.

We present a complete analysis in the Mathematica notebook, 1-005b-T-Mma-ChemDataCollection-TeacherVersion.nb and a pdf version, 1-005b-T-Mma-ChemDataCollection-TeacherVersion.pdf. In the Teacher Version we demonstrate how we generate this data using Mathematica commands. We  offer an analysis in the  case of the linear using  (\ref{eq:form1}) and  non-linear using (\ref{eq:form2}) regression of $y'(t)$ approximation on $y(t)$, i.e. a second order reaction with some addition due to infusion of compound A. For other approaches one needs to visit the 1-005-OilSlick scenario.




\begin{thebibliography}{99}


\bibitem{Winkel2014} Winkel, B. J. 2014. Spread of Oil Slick. 1-005-OilSlick-StudentVersion. 
\end{thebibliography}

}
\end{document}
