% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
% 
% 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.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\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.
%
% 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 only 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.
%
\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
%\usepackage{hyperref}
\usepackage{url}
%
\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
%
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote. 
% See above for instructions on toggling from Teacher Version to Student Version.
%
\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\Bacteria Growth}





\markboth{Bacteria Growth}{Bacteria Growth}

\author{Arati Nanda Pati\\
University of St. Thomas\\
Houston TX 77006 USA\\
patia@stthom.edu
}

\makeStitlePDFLaTex


\begin{abstract}
We offer students a simulation experience or data from a simulation and ask them to model the simulation using several approaches, to include exponential growth fit, difference equation, differential equation, and parameter estimation using EXCEL spreadsheet. In this particular modeling scenario, we know the exact solution and want to see how various models predict our expectations. We have used EXCEL and {\it{WolframAlpha}} for students to experience and appreciate modeling approaches without worrying much about technology and programming.  
\end{abstract}


\section*{SCENARIO DESCRIPTION}

\subsection*{Bacteria Growth:} Imagine that we observe bacteria that undergo cell division and divide every twenty minutes to reproduce exactly two copies of themselves. At the start of the experiment assume that there was exactly one bacterium. We would like to ask, how will the number of bacteria change over time? We have sketched a diagram  in Figure~\ref{fig:1-062-BacteriaFigure} to have a better understanding of the growth of bacteria in discrete time. In order to describe our observation, we call the initial time, the time when we started the experiment is equal to zero where the number of bacterium is one. After twenty minutes, the bacterium subdivides into two. Twenty minutes later, each bacterium splits further, resulting in four bacteria at time 40 minutes, and so on. 

\subsection*{Collect the data:}
In order to describe our data set of two columns first with time in minutes and second with number of bacteria. Table~\ref{table:data} shows  the data set for bacteria growth with discrete time. We can simplify the data if we measure time in a more convenient way.  Considering one unit of time to be equal to 20 minutes. The data is visualized in Figure~\ref{fig:1-062-dataplot}.


\begin{itemize}
\item[(a)] Build a  model for $a(n)$, the population growth of bacteria after $n$ units of time, where $a(0)=1$. State your assumptions clearly and show how they are used in the model building process. Compare your model prediction with the data.
\item[(b)]Build a model with a difference equation for $a(n)$ the population growth of bacteria after $n$ units of time, where $a(0)=1$. State your assumptions clearly and show how they are used in the model building process. Compare your model prediction with the data.
\item[(c)]Build a model with a differential equation for $a(n)$ as a continuous population growth of bacteria after $n$ units of time, where $a(0)=1$. Compare your model prediction with the data. 
\item[(d)]Build a model for parameter estimation for the differential equation model where $a(n)$ represents the continuous population growth of bacteria after $n$ units of time, and  $a(0)=1$. Compare your model prediction with the data and estimate the parameter value and error of estimates.
\end{itemize}


\begin{figure}
\centering
\includegraphics[width=8.5cm]{1-062-BacteriaFigure}
\vspace*{-1.5 true cm}

\parbox{8.5 true cm}{\caption{\label{fig:1-062-BacteriaFigure}  Bacteria split every 20 minutes.}}
\end{figure}



\begin{table}[h]\label{table:data}
\begin{center}
\begin{tabular}{|c|c|c|} \hline
\multicolumn{1}{|c|}{Time(min)} & \multicolumn{1}{|c|}{Time Unit}  &\multicolumn{1}{|c||}{Number of Bacteria} \\ \hline
&\multicolumn{1}{|c|}{$n$} & \multicolumn{1}{|c|}{$a(n)$} \\ \hline
0&0& 1\\ \hline
20&1& 2 \\ \hline
40&2& 4\\ \hline
60&3& 8\\ \hline
80&4& 16\\ \hline
100&5& 32\\ \hline
120&6& 64\\ \hline
140&7& 128\\ \hline
160&8& 256\\ \hline
180&9& 512\\ \hline
200&10& 1024\\ \hline
\end{tabular}

\parbox{10.7 true cm}{\caption{\label{table:data}This simulation describes the growth of bacteria population in every twenty minutes where one unit of time is considered as 20 minutes.}}
\end{center}
\end{table}





\begin{figure}[!h]
\centering
\includegraphics[width=8.5cm]{1-062-dataplot}
\vspace*{-3.5 true cm}

\parbox{8.5 true cm}{\caption{\label{fig:1-062-dataplot}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth.}}
\end{figure}



\newpage 
\teacher{
\section*{NOTES FOR TEACHERS}

We found this exponential growth model in \cite{Neuhauser2010} with exact data. We want to model it with difference and differential equations that represent  exponential growth. This work has been inspired by the m\&m Death and Immigration model 
\cite{WinkelMM}. We use {\it WolframAlpha } \cite{WolframAlpha} to solve all of our mathematical models.


\subsection*{(a) General Model}

We can write a formula here.
When $n=0$, $a(n)=1$.
We have the following sequence:

\begin{align*}
a(0) &= 1 = 2^0\\
a(1) &= 2= 2^1\\
a(2) &= 4 =2^2\\
a(3) &= 8 = 2^2\\
&\vdots\\
\end{align*}

In general we can have the following iteration formula for time unit $n$, $a(n) =2^n$.

\begin{figure}[!h]
\centering
\includegraphics[width=8.5cm]{1-062-generalmodel.jpg}
\vspace*{-3.5 true cm}

\parbox{8.5 true cm}{\caption{\label{fig:1-062-generalmodel}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth with the General Model where modeling and data match exactly.}}
\end{figure}


\subsection*{(b) Recursion Equation Model}


\begin{align*}
a(0) &= 1\\
a(1) &= 2 = 2*a(0)\\
a(2) &= 4 =2*a(1)\\
a(3) &= 8 = 2*a(2)\\
&\vdots\\
a(n+1) &= 2*a(n)
\end{align*}

\noindent
We have the following formula to get the new value from the old one just by multiplying 2, we get 

\[
a(n+1) = 2*a(n), a(0) =1\, .
\]

\noindent
We use \cite{WolframAlpha} to solve it using the command {\tt solve a(n+1)=2*a(n), a(0)=1}. 
WolframAlpha displays the solution as $a(n) =2^n$. Inserting this in Excel spreadsheet, we get 
Figure~\ref{fig:1-062-DifferenceModel1}.







\begin{figure}
\centering
\includegraphics[width=8.5cm]{1-062-DifferenceModel1.jpg}
\vspace*{-2.2 true cm}

\parbox{9.3 true cm}{\caption{\label{fig:1-062-DifferenceModel1}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth with (b), the Recursion Equation  Model where modeling and data match exactly.}}
\end{figure}


\subsection*{(c) Difference Equation Model}

We can rewrite the above recursion equation

$a(n+1) = 2*a(n), a(0) =1$,

\noindent
by subtracting $a(n)$ from both sides as follows:


$a(n+1) - a(n) = a(n), a(0) =1$.

\noindent
The {\it{WolframAlpha}} command {\tt solve a(n+1)-a(n)=a(n), a(0)=1}, displays the solution as {$a(n) =2^n$}. Inserting this in Excel spreadsheet, we get  the following solution as shown in Figure~\ref{fig:1-062-DifferenceModel2}.


\begin{figure}[!h]
\centering
\includegraphics[width=8.5cm]{1-062-DifferenceModel2.jpg}
\vspace*{-2.5 true cm}

\parbox{9.3 true cm}{\caption{\label{fig:1-062-DifferenceModel2}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth with (c), the Difference Equation Model where modeling and data match exactly.}}
\end{figure}


\subsection*{(d) Differential Equation Model}

We consider a small time increment $\triangle n$. Instead of going from discrete time step $n$ to $n+1$, we go with time increment $\triangle n$. Therefore, 

\noindent$a(n+1) - a(n) = a(n), a(0) =1$ can be written as  $a(n+\triangle n) - a(n) = \triangle n * a(n)$  or
$$\frac{a(n+\triangle n) - a(n)}{ \triangle n } =  a(n)\, .$$  

\noindent
As limit $\triangle n \rightarrow 0$, we see that 

$$   \lim_{\triangle n \to 0}  \frac{a(n+\triangle n) - a(n)}{ \triangle n } =   \frac{da}{dn} = a(n) \, .$$ 


So we arrive at the initial value differential equation

\[
\frac{da}{dn} = a(n)\, \quad a(0) = 1\, .
\]
 
We use the {\it WolframAlpha } command {\tt solve a'(n)=a(n), a(0)=1}, which  displays the solution as $a(n) =e^n$. Here the symbol, ' denotes derivative. Inserting this in Excel spreadsheet, we get  the following data given in Table~\ref{table:data2} that is displayed in Figure~\ref{fig:1-062-DEmodel}. We find that the data and model do not match.


\begin{figure}[!h]
\centering
\includegraphics[width=8.5cm]{1-062-DEModel.jpg}
\vspace*{-2.5 true cm}

\parbox{10 true cm}{\caption{\label{fig:1-062-DEmodel}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth modeled with (d), the Differential Equation Model where modeling and data do not match.}}
\end{figure}


\begin{table}[h]\label{table:data2}
\begin{center}
\begin{tabular}{|c|c|c||} \hline
\multicolumn{1}{|c|}{Time Unit} & \multicolumn{1}{|c|}{Number of Bacteria} & \multicolumn{1}{|c||}{Differential Equation Model} \\ 
\hline
\multicolumn{1}{|c|}{n} & \multicolumn{1}{|c|}{a(n)}  & \multicolumn{1}{|c||}{a(n)=$e^n$}\\ \hline
0& 1 & 1\\ \hline
1& 2  & 2.718282\\ \hline
2& 4 & 7.389056\\ \hline
3& 8 & 20.08554\\ \hline
4& 16 & 54.59815\\ \hline
5& 32 & 148.4132\\ \hline
6& 64 & 403.4288\\ \hline
7& 128 & 1096.633\\ \hline
8& 256 & 2980.958\\ \hline
9& 512 & 8103.084\\ \hline
10& 1024 & 22026.47\\ \hline
\end{tabular}
\parbox{10.7 true cm}{\caption{\label{table:data2} The time units describe the growth of bacteria population where one unit of time is considered as 20 minutes compares with the bacteria population with differential equation model.}}
\end{center}
\end{table}






\subsection*{(e) Parameter Estimation}

We observe that the differential equation model does not match with the data set. Therefore, we need to modify the differential equation model. Instead of solving the differential equation,

\[\frac{da}{dn} = a(n), a(0) =1\, ,  \]

\noindent we solve the differential equation with proportionality constant $k$,

\[\frac{da}{dn} =k* a(n), a(0) =1  \, ,\]

\noindent where $k$ is unknown. We  need to find the value for $k$ for which the solution will match the original data best.

We solve the differential equation using {\it{WolfraAlpha}} command  {\tt solve a'(n)=k*a(n), a(0)=1} and it displays the solution as {$a(n) =e^{kn}$} where a value of $k$ needs to be determined. Initially we will guess a value for $k$, to determine the solution of the modified differential equation for each time unit $n$. We can compute the differences between our model and the data and square each of these terms to get the sum of squared errors. Now our goal is to minimize this total squared error. Excel has a built in `solver', which minimizes this error for the value of $k$ \cite{solver}. For this experiment we obtained $k= 0.693147$. This yields sum error squared $1.32E-06$, which suggests a great match between the data and the model.The value of $R^2$ measures how well data and model agree with each other. A value closer to $1$ is considered to be good. In our example, we get $R^2=1$. The data table displays great agreement which is displayed in Figure~\ref{fig:1-062-DEparameter}.

  

\begin{figure}[h]
\centering
\includegraphics[width=8.5cm]{1-062-DEparameter.jpg}
\vspace*{-2.3 true cm}

\parbox{10 true cm}{\caption{\label{fig:1-062-DEparameter}  Plot of the data from Table~\ref{table:data} in which $n$ is the time unit and $a(n)$ is the number of bacteria growth with the differential equation model where modeling and data match perfectly for $k= 0.693147$ .}}
\end{figure}



We modeled a particular example where we have inital condition is 1 and rate of growth is 2. We can generalize it to
$a_0R^n$, where $a_0$ is the given initial condition and $R$ is the rate of growth. If $R >1$ then it models exponential 
growth and if $0 < R< 1$ then it models exponential decay.








Here our goal is to engage students to appreciate modeling as a powerful tool to view the real world instead of struggling with programing. So we have used EXCEL and {\it{WolframAlpha}} for easy access to solve and visualize the modeling problems.



\begin{thebibliography}{99}





\bibitem{Neuhauser2010}  Neuhauser, C. 2010. {\it  Calculus for Biology and Medicine\/}. 3ed.:  Pearson.

\bibitem{solver} APMonitor Community. 2017.  ODE Parameter Estimation in Excel. \url{https://www.youtube.com/watch?v=eXco8_3MmjI}. Accessed 12 September 2018.

\bibitem{WinkelMM} Winkel, B. 2015. {\it m\&m-Death and Immigration\/}. 1-1-S-MM-DeathImmigration-StudentVersion.pdf. \url{https://www.simiode.org/resources/132}.  SIMIODE . Accessed 12 September 2018. 

\bibitem{WolframAlpha} Wolfram Alpha. \url{https://wolframalpha/com}. Accessed 12 September 2018.

\end{thebibliography}
}



\end{document}
