% 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}
%
%
\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{url}
%\usepackage{tikz,pgfplots}


\renewcommand{\baselinestretch}{1.3}

\begin{document}

\newpage

\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\Steeping Tea \\ A differential equations approach to a great cup of fruit tea}




\markboth{Steeping Tea}{Steeping Tea}

\teacher{
    \author{
    Jesica Bauer, Eric Sullivan, Erica Wiens\\
Carroll College\\
Helena, MT 59624  USA\\
jbauer@carroll.edu, esullivan@carroll.edu, ewiens@carroll.edu}
}
% \ifnum\TeacherEdition=0 
% \author{} 
% \date{}
% \fi
% 
% \maketitle
% \ifnum\TeacherEdition=0
% \vspace{-1in}
% \fi
 \makeStitlePDFLaTex


\begin{abstract}
In this activity, we provide photographs of the steeping process for a fruit tea steeped
in hot water.  Students build a differential equation model for the steeping process and
do parameter estimation using the color of our tea as a way to measure relative
concentration of the tea oils in solution.  Students then build a differential equation
model for the dissolution of a sugar cube in the tea and use data to estimate parameters.
Finally, students use Newton's law of cooling to estimate the temperature of our tea after
it has steeped for a certain amount of time and after the sugar has been completely
dissolved.
\end{abstract}


\section*{SCENARIO DESCRIPTION}

There is just nothing better than a great cup of tea!  In this activity, you will be given
experimental data for the steeping of a fruit tea, the dissolution of a sugar cube in the
tea, and the changing temperature of the tea.  Your job will be to model each of these three processes using differential equations and present your findings in a technical report.

\subsection*{Your Tasks:}
Please view all the tasks, data sets, images, and hints before you start the tasks in
order to understand the full scope of the problem.
\begin{enumerate}
	\item Use the color and/or gray scale data given in Table \ref{tab:temp_color_data}
        (and shown pictorially in
        Figure \ref{fig:time_evolution}) to develop, analyze, and solve a differential
        equation model for the concentration of the tea.  In this case, color is being
        used as a proxy measure for the concentration of the dissolved tea oils. In Table
        \ref{tab:temp_color_data} we give the red, green, blue (RGB), and grayscale color
        values. The grayscale values were calculated from the RGB values using the formula 
        \begin{flalign}
            x =
            0.288R+0.587G+0.114B \label{eqn:grayscale_conversion}
        \end{flalign}
        where $x$ is the grayscale value corresponding to the RGB value of a pixel \cite{grayscale}.  The
        RGB values were extracted from the photographs using Adobe Photoshop. A sample of
        10 pixels were chosen in the white squares indicated in Figure
        \ref{fig:time_evolution} and the averaged and rounded RGB values are given in Table
        \ref{tab:temp_color_data}.    
        
        Table \ref{tab:RGB_meaning} gives the meanings of the color values.  The color
        values are common across photography software.  Notice in particular that a photo
        that is pure white has a grayscale value of 255 and a photo that is pure black has
        a grayscale value of 0. Since the tea is changing color from lighter to
        darker we expect the grayscale value to be decreasing with time. It should be
        noted that the extraction of RGB color values can be done with any free or proprietary photo
        editing software (e.g.  Photoshop, MS Paint, Digital Color Meter (Mac), etc).


\begin{figure}
	\begin{center}
    	\includegraphics[trim=0cm 2cm 1cm 0cm, clip, width=0.9\columnwidth]{1-094-Tea_TimeEvolution.jpg}
    \end{center}
    \caption{The time evolution of the tea steeping.  The top left image is at $t=60$
    seconds; then reading along the rows for $t=90$ seconds and $t=120$ second on the
first row. The second row of images shows $t=150$ seconds, $t=180$ seconds, and $t=210$
seconds.  The third row has $t=240$ seconds, $t=270$ seconds (left and middle) and $t=600$
seconds (bottom right).  The white squares indicate where the pixel samples was taken in
the photo software.}
    \label{fig:time_evolution}
\end{figure}

\begin{table}
	\begin{center}
    	\begin{tabular}{|c|c|c|c|c|c|}
        	\hline
            Time (seconds) & Temperature ($^\circ$F) & R color value & G color value & B color value & Grayscale \\ \hline \hline
            $\approx 5$	& 160 & 190	& 138 & 80 & 144.846 \\
			60	& 155 & 170 & 45 &	15 & 77.085 \\
			90	& 	  & 161 & 20 & 10 & 59.248\\
			120	&	  &	136	& 13 & 5 & 47.369 \\
			150 & 	  & 131	& 13 & 5 & 40.701 \\
			180	& 145 &	121	& 9 & 9 & 46.385 \\
			210	& 142 &	108	& 9	& 4 & 36.843 \\
			240 & 	  & 96	& 7 & 1 & 31.871 \\
			270 &	  & 90	& 4 & 3 & 28.61 \\ \hline
			600	& 120 &	73	& 5	& 2 & 24.187 \\ \hline 
        \end{tabular}
    \end{center}
    \caption{Temperature and color data. The color data for time $t\approx 5$ was taken from Figure \ref{fig:Time_00} and the remainder of the color data was taken from Figure \ref{fig:time_evolution}. The Grayscale conversion was calculated via $x = 0.288R+0.587G+0.114B$ as found in \cite{grayscale}.}
    \label{tab:temp_color_data}
\end{table}


\begin{table}
	\begin{center}
    	\begin{tabular}{|c|c|c|c|c|}
        	\hline
            Color & R color value & G color value & B color value & Grayscale value \\ \hline \hline
            Pure black & 0 & 0 & 0 & 0 \\
            Pure white & 255 & 255 & 255 & 255 \\
            Pure red & 255 & 0 & 0 & - \\
            Pure green & 0 & 255 & 0 & - \\
            Pure blue & 0 & 0 & 255 & - \\ \hline 
        \end{tabular}
    \end{center}
    \caption{The meaning of the RGB color values pulled from the photo software.}
    \label{tab:RGB_meaning}
\end{table}




    \item Use the small set of sugar cube data in Table \ref{tab:sugar_cube} to develop,
        analyze, and solve a differential equation model for the dissolution of a 1cm$^3$
        sugar cube in the tea.  Determine the amount of time that it takes to dissolve the
        sugar cube. (Hint: it completely dissolves).  Include a plot of the time
        evolution of the sugar dissolution.  Be sure that your data points are visible
        on the plot. 

\begin{table}
	\begin{center}
    	\begin{tabular}{|c|c|}
        	\hline
        	Time (seconds) & Side Length (cm) \\ \hline \hline
            0 & 1 \\
            30 & 0.6 \\ \hline
        \end{tabular}
    \end{center}
    \caption{The sugar cube data.  Due to the quick dissolution of the sugar cube we only have two data points.}
    \label{tab:sugar_cube}
\end{table}

    \item Use the temperature data in Table \ref{tab:temp_color_data} to develop, analyze,
        and solve a differential equation model for the temperature of the tea during the
        time that it takes to steep. Include a plot of the time evolution of the
        temperature. Be sure that your data points are visible on the plot. 
    \item Write a clear paper to a technically sophisticated audience giving the details of your differential equation modeling tasks and your results.  Be sure to state and defend all of your assumptions in clear language.
\end{enumerate}



\subsection*{Experimental Setup:}
Now we give the details of the experimental setup.
\begin{description}
	\item[Equipment:] The following equipment was used to gather the data.
    	\begin{description}
        	\item[Container:] Standard large Mason jar for canning filled with 1.5 cups of hot water.  See Figure \ref{fig:Time_00}.

        \begin{figure}[ht!]
            \begin{center}
                \includegraphics[trim=5cm 1cm 5cm 0cm, clip, width=0.4\columnwidth]{1-094-Time_00.jpg}
                \includegraphics[trim=0cm 0cm 0cm 6.5cm, clip, width=0.4\columnwidth]{1-094-Equipment.jpg}
            \end{center}
            \caption{The experimental equipment.  The image on the left shows the setup at roughly $t \approx 5$ seconds.  The right image shows the porous cylindrical tea steeper, the thermometer, the tea, and the Mason jar.}
            \label{fig:Time_00}
        \end{figure}


            \item[Tea:] {\it Steeped Tea} brand Jenna Cherry Jubilee Fruit Tea.  Suggested instructions are for 4 to 5 minutes of steeping in hot water with 1.5 to 2 teaspoons of tea.  In this experiment we used 2 teaspoons of tea in a porous metal tea steeper (not in a standard teabag).  According the packaging the ingredients for the tea were: Hibiscus petals, rose hip, apple pieces, banana pieces, cherry pieces, strawberry pieces, orange pieces, and natural flavors.
            \item[Steeper:] Metal porous cylindrical tea steeper.  The cylinder has a height of 2 inches measured from the bottom of the container to the top of the pores.  The cylinder has a constant diameter of 1.5 inches.
            \item[Thermometer:] Standard (clean) kitchen meat thermometer.
            \item[Camera:] Canon EOS 60D
        \end{description}

	\item[Data Collection:] Data was collected on Jan 21, 2017 starting at 10AM MST.
    	\begin{itemize}
        	\item The ambient temperature in the room for the duration of the experiment was approximately constant at 66$^\circ$F. 
            \item The water was initially warmed to 160$^\circ$F and then poured into the
                Mason jar.  The tea steeper, containing 2 teaspoons of the tea, was placed
                into the water so that the water level was over top of the highest pores.
                Temperature was then gathered periodically throughout the experiment.  The
                left side of Figure \ref{fig:Time_00} shows an image of the Mason jar and
                tea steeper at time $t \approx 5$
                seconds and the right side of Figure \ref{fig:Time_00} shows the porous tea steeper, the tea packaging, the thermometer, and the Mason jar. See Table \ref{tab:temp_color_data} for temperature data.
            \item The Canon EOS 60D camera was set to take a picture every 30 seconds starting at the 1 minute mark.  The camera was placed on a tripod and was not touched during the process.
            \item Pictures were taken until 4 minutes and 30 seconds and then the tea was allowed to cool and continue to steep until the 10 minute mark, at which point one more picture and temperature reading were taken.  The 10 minute data for color was taken to represent a maximum color saturation.  
            \item Lighting was held approximately constant during the 10 minute
                experiment.  See Table \ref{tab:temp_color_data} for the RGB color value
                data and see Table \ref{tab:RGB_meaning} for the meaning of the RGB color
                values.  The color values were converted to grayscale using the conversion
                found in \cite{grayscale}. 



	\item The tea was stirred with 6 counterclockwise rotations around the steeping cylinder every 30 seconds starting from $t\approx 5$ seconds to just before the 10 minute mark.

            \item See Figure \ref{fig:time_evolution} for the time evolution starting
                at 1 minute reading across the rows until 4 minutes 30 seconds.  The
                bottom right image in Figure \ref{fig:time_evolution} shows the tea at 10 minutes.
                Adobe Photoshop was used to extract RGB pixel values for each
                image.  Pixel values given are the rounded average of 10 randomly selected pixels from inside the white squares in Figure \ref{fig:time_evolution}.
            \item The sugar cube was dissolved in the Mason jar starting at a temperature of 150$^\circ$F and stirred slowly until it was invisible.  See the sugar cube data in Table \ref{tab:sugar_cube}.  A standard set of calipers was used to measure the side length of the sugar cube. 
        \end{itemize}
\end{description}





\subsection*{Suggestions}
\begin{enumerate}
	\item You do not need to do the tasks in order.  Some of the tasks should be easier than others.
    \item For each task try to initially come up with the simplest differential equation
        model.
        Make several simplifying assumptions, if necessary, but be sure to state them
        clearly in your write-up.  The simplest differential equations for this scenario are likely first order, but they are not necessarily linear.
    \item You are allowed to use any appropriate software and any by-hand solution techniques for the differential equations.  Software is likely not necessary for most parts of this activity so don't get stuck by going to the computer first.
    \item You will need to do some parameter estimation for this  problem and parameter
        estimation is usually best done with software.  There are several software tools
        available for doing this and in the list below we give you a few videos with step-by-step instructions for how to use the software.  The instructions are given on a data set unrelated to this problem so you will need to modify anything you see in the videos to work for these problems.
    \begin{itemize}
    	\item Parameter estimation in Excel: \url{https://youtu.be/mEthE6Hia-k}
        \item Parameter estimation in MATLAB: \url{https://youtu.be/9mmm5N0lz5o}
        \item Parameter estimation in R: \url{https://youtu.be/9qjIrEyQiAk}
    \end{itemize}
    \item For the concentration problem you may want to start by modeling the process in which the tea oil is leached from the tea leaves and then conjecture a simple mathematical formula to convert to the grayscale color value. Be sure to be clear when you write up your process.
    \item Be creative and have fun!
\end{enumerate}











\begin{thebibliography}{98}
\bibitem{grayscale} Wikipedia article for grayscale.\href{https://en.m.wikipedia.org/wiki/Grayscale}{https://en.m.wikipedia.org/wiki/Grayscale}.  Accessed January 2017.


\end{thebibliography}


\teacher{
\section*{NOTES FOR TEACHERS}
We will begin these teacher comments by examining the authors' solutions to the three main
tasks.  At the end of the authors' solutions we will give a few examples of student
approaches (gathered with university IRB approval) and give several suggestions and
possible hints that could be given to the students.  This particular modeling scenario
will use first order differential equations and contains a mix of linear and nonlinear
differential equations.  The most common by-hand techniques that we encountered were
separation of variables and/or method of undetermined coefficients.

\subsection*{The Tea Differential Equation}
We propose solutions generated by the authors.  It should be noted that two of the authors
of this modeling scenario are undergraduate students working as tutors for the
differential equations course in which this modeling scenario was used.  Furthermore, you
may note that two of the values in Table \ref{tab:temp_color_data} were purposefully
incorrect (for $R=131$ we should have given 45.929 and for $R = 121$ we should have given
41.157). The interested instructor should change these values in Table
\ref{tab:temp_color_data} if they don't want this distraction.




We first make a few assumptions.
\begin{enumerate}
	\item The color of the tea is directly related to the concentration of the tea oils dissolved in the water.  This is a fruit tea so we are not taking into account the re-hydration of the fruit in this assumption.
    \item We will assume that the grayscale conversion of the RGB color values is enough to capture the effect of all three colors and enough to capture the effect of the tea oil being leached from the tea.
    \item We assume that the rate at which the grayscale changes is directly proportional to the rate at which the tea oil is leached from the tea leaves
    \[ G'(t) \propto L'(t) \]
    where $G(t)$ is the grayscale as a function of time and $L(t)$ is the amount of tea
    in the tea leaves.  
    \item Now we make the assumption that the rate that the tea oil is leached out of the
        leaves is proportional to the amount of tea oil remaining in the leaves,
        \[ L'(t) \propto \left( L_{max} - L(t)\right), \]
        where $L_{max}$ is the maximum amount of oil in the tea leaves.  Hence, the
        function $G(t)$ will take the form 
%         \[ G(t) = C_0 e^{\kappa t} + C_1. \]
%         and so we can write the differential equation for the grayscale color value as 
%         \[ G'(t) = C e^{-\kappa t}. \]  
%         Clearly this simple first order linear non-homogeneous differential equation has a solution of the form 
        \begin{flalign}
        	G(t) = C_0 e^{\kappa t} + C_1. \label{eqn:sullivan_2}
        \end{flalign}
        We can use software-based optimization tools (such as \texttt{Solver} in Excel,
        \texttt{fminsearch} in MATLAB, or \texttt{nlm} in R) to 
        estimate $C_0$, $C_1$, and $\kappa$.  Doing
        this we find that
        \begin{flalign}
            G(t) \approx 124.204 e^{-0.015t} + 28.768
            \label{eqn:Gray_color}
        \end{flalign}
        giving the solid line plot in Figure \ref{fig:sullivan_soln}.  Using software we
        find a coefficient of determination $R^2 \approx 0.9883$; a very strong fit.  If
        we were to use the correct values for the grayscale measurements then the fitted
        model is
        \begin{flalign}
            G(t) \approx 124.371 e^{-0.015t} + 28.328
            \label{eqn:Gray_color_correct}
        \end{flalign}
        with a coefficient of determination $R^2 \approx 0.9931$; a stronger fit.


\begin{figure}
	\begin{center}
        \includegraphics[width=0.55\columnwidth]{1-094-SampleSoln.eps}
    \end{center}
    \caption{Sample solution to the concentration (color) problem using \eqref{eqn:sullivan_2}.}
    \label{fig:sullivan_soln}
\end{figure}

\item Now we examine how our model relates to concentration.  
In \eqref{eqn:sullivan_2} we see that $C_1 = \lim_{t \to \infty} G(t)$ and we take this
grayscale value to stand in proxy for the maximum concentration. Using this we can
re-scale the other values to give a percent of the maximum concentration.  Given that the
grayscale values run from 0 to 255 we will take $G = 255$ to be no concentration,
$(G,\mathcal{C}) = (255,0)$, and we will take $C_1 \approx 28.328$ as the maximum
concentration $(G,\mathcal{C}) = (28.328,1)$, to define the affine transformation from
grayscale value $G$ to relative concentration value $C$, call it $\mathcal{C}(t)$:
\[ \mathcal{C}(t) = -\frac{1}{226.672}G(t) + \frac{255}{226.672}. \]
Here we are defining maximum concentration to have a relative concentration value of 1 so
we can interpret the relative concentration as a percent of maximum concentration.
The relative concentration as a function of time is
\begin{flalign}
	\mathcal{C}(t) \approx -\frac{1}{226.672}\left( 124.371 e^{-0.015 t} + 28.328 \right)
    + \frac{255}{226.672}. \label{eqn:rel_concentration}
\end{flalign}
giving a concentration at the end of drinking time, $t = 270$ seconds, of
$\mathcal{C}(270) \approx 99\%$ of the maximum concentration as shown in Figure
\ref{fig:relative_concentration}.  Thus, the packaging for the tea has it right that steeping for roughly 4.5 minutes (and then maybe dissolving some sugar) gives a tea that is at roughly 99\% the maximum strength!

\begin{figure}
	\begin{center}
%     	\begin{tikzpicture}
%         	\begin{axis}[axis lines=center, xmin=0, xmax=600, ymin=0, ymax=1.2, grid,xlabel={time (sec)}, ylabel={Relative Concentration, $\mathcal{C}$}, x label style={at={(axis description cs:0.5,-0.1)},anchor=north},y label style={at={(axis description cs:-0.1,.5)},rotate=90,anchor=south}, legend pos=south east]
% %                 \addplot[smooth,blue,thick,domain=5:600, samples=100] {-(1/226.144)*(-17.02*x^(1-0.79)/(1-0.79) + 0.13*x + 257.36) + (255/226.144)};
% %                 \addlegendentry{Relative Concentration from \eqref{eqn:sullivan_1}};
%             	\addplot[smooth,red,thick,domain=5:600] {-(1/226.144)*(125.16*exp(-0.0152*x)+28.856) + (255/226.144)};
%                 \addlegendentry{Relative Concentration};
%                 \addplot[only marks, mark=*,color=black] coordinates{
%                 (5,0.4871)(60,0.78673)(90,0.86561)(120,0.91713)(150,0.94762)(180,0.92249)(210,0.96468)(240,0.986668)(270,1)(600,1.02)};
%                 \addlegendentry{Relative Concentration Data}
%             \end{axis}
%         \end{tikzpicture}
        \includegraphics[width=0.55\columnwidth]{1-094-RelConcentration.eps}
    \end{center}
    \caption{Relative concentration taking the horizontal asymptote of \eqref{eqn:sullivan_2} as the maximum concentration at $\mathcal{C} = 1$.}
    \label{fig:relative_concentration}
\end{figure}


\end{enumerate}




\subsection*{The Sugar Cube Differential Equation}
If we let $V$ be the volume of the sugar cube we can assume that the rate of change of the
volume is proportional to the surface area, $S$, of the sugar cube
\begin{flalign}
	\frac{dV}{dt} = k S(t). \label{eqn:dV_propto_S}
\end{flalign}
We know that $V(0) = 1$ and $V= V(x) = x^3$ where $x$ is the length of a side of the cube in centimeters.  The surface area of the cube is $S = 6x^2$.  Solving the volume equation for $x$ and substituting into the surface area equation we see that $S(V) = 6 V^{2/3}$.  Therefore \eqref{eqn:dV_propto_S} becomes
\begin{flalign}
	\frac{dV}{dt} = 6 k V^{2/3}. \label{eqn:sugar_ODE}
\end{flalign}
Equation \eqref{eqn:sugar_ODE} can be solved using the separation of variables technique as
\begin{flalign*}
	\frac{dV}{V^{2/3}} = 6k dt \quad \implies \quad  \int \frac{dV}{V^{2/3}} &= \int 6k dt \quad \implies \quad 3V^{1/3} = 6kt + C \\
    \implies V &= (2kt + C)^3.
\end{flalign*}
Using the initial condition $V(0) = 1$ we see that the volume of the sugar cube is given by 
\begin{flalign*}
	V(t) = (2kt+1)^3.
\end{flalign*}
Now we can use the second data point in Table \ref{tab:sugar_cube} to see that 
\[ 0.6^3 = 0.216 = (60k+1)^3 \quad \implies \quad 0.6 = 60k+1 \quad \implies \quad -0.4 = 60k \quad \implies \quad k = -\frac{1}{150}. \]
Therefore, the volume of the sugar cube is 
\begin{flalign}
	V(t) = \left( -\frac{1}{75} t + 1 \right)^3 \label{eqn:volume_sugar}
\end{flalign}
and as we can see in Figure \ref{fig:sugar_plot} (and should be algebraically obvious) the
sugar takes approximately 75 seconds to dissolve.  The students need to recognize that the domain on the sugar cube
function is $t \in [0,75]$ since the model turns out to be a cubic function and gives
negative volumes after $t = 75$ seconds.

\begin{figure}
\begin{center}
% 	\begin{tikzpicture}
%     	\begin{axis}[axis lines=center, xlabel={time (sec)}, ylabel={Volume (cm$^3$)}, grid, ymin=0, xmin=0, xmax=80, x label style={at={(axis description cs:0.5,-0.1)},anchor=north},y label style={at={(axis description cs:-0.1,.5)},rotate=90,anchor=south}]
%         	\addplot[smooth, thick, blue, domain=0:75] {((-1/75)*x+1)^3};
%             \addlegendentry{Sugar Cube Solution \eqref{eqn:volume_sugar}};
%             \addplot[only marks, mark=*, color=black] coordinates {(0,1)(30,0.216)};
%             \addlegendentry{Data Points};
%             \addplot[only marks, mark=*, color=red] coordinates {(75,0)};
%             \addlegendentry{Final Time};
%         \end{axis}
%     \end{tikzpicture}
    \includegraphics[width=0.55\columnwidth]{1-094-SugarPlot.eps}
\end{center}
\caption{The volume of the sugar cube as a function of time from \eqref{eqn:volume_sugar}.
The two points indicate when the sugar cube was first placed in the container
$(t,V)=(0$ seconds$,1$cm$^3)$ and when the sugar cube should completely dissolve $(t,V) =
(75$ seconds$,0$cm$^3)$.}
    \label{fig:sugar_plot}
\end{figure}

If students decide to assume that the sugar cube sits on the bottom of the container then they may end up with a slightly different differential equation.  Under this new assumption there will only be five faces of the cube exposed to the liquid (ideally) so a possible alternative to \eqref{eqn:sugar_ODE} is 
\begin{flalign}
	\frac{dV}{dt} = 5 k V^{2/3}. \label{eqn:sugar_ODE_5faces}
\end{flalign}
The general solution to \eqref{eqn:sugar_ODE_5faces} with the initial condition $V(0)=1$ is
\[ V(t) = \left( \frac{5}{3} k t + 1 \right)^3. \]
With the data from Table \ref{tab:sugar_cube} it is easy to show that we arrive at the exact same solution as before (see Figure \ref{fig:sugar_plot}).  This may confuse students since it doesn't seem intuitive that we get the same function with fewer faces visible, but we will actually have different dissolution rates through each side of the cube in the two scenarios in order to match the given data.

\subsection*{The Temperature Differential Equation}
For the temperature problem we use Newton's law of cooling and some parameter fitting.
Recall that Newton's law of cooling says
\[ \frac{dT}{dt} = -k \left( T - T_{env} \right) \]
where $T$ is the temperature of the tea, $k$ is the proportionality constant, and
$T_{env}$ is the temperature of the environment.  Since we are given that $T_{env}= 66$
and $T(0) = 160$ we have the separable differential equation, 
\[ \frac{dT}{dt} = -k (T-66) \quad \text{with} \quad T(0) = 160, \]
which leads to the solution
\begin{flalign}
	T(t) = 94e^{-kt} + 66. \label{eqn:temp_soln}
\end{flalign}

To find the value of $k$ we choose to use an optimization software package (as discussed
previously) to minimize the sum of the squares of the errors between our function and the data points.  
% That is, we seek to find a numerical solution to the optimization problem
% \begin{flalign}
% 	\min_{k} \left( \sum_{j=1}^n \left( T(t_j) - \tau_j \right)^2 \right)
%     \label{eqn:find_k}
% \end{flalign}
% where $n$ is the number of data points, $T(t_j)$ is function \eqref{eqn:temp_soln} evaluated at time $t_j$ , and $\tau_j$ is the $j^{th}$ temperature point from Table \ref{tab:temp_color_data}.  
Minimizing over $k$
% in \eqref{eqn:find_k} 
gives $k \approx 0.000944178$ (with $R^2 \approx 0.998$) and hence the temperature solution is
\begin{flalign}
    T(t) \approx 94 e^{-9.4418 \times 10^{-4}t} + 66 \label{eqn:temp_final_soln}
% T(t) \approx 94 \text{exp}\left(-9.4418 \times 10^{-4}t \right) + 66 \label{eqn:temp_final_soln}
\end{flalign}
and is shown with the data in Figure \ref{fig:temp}.  

\begin{figure}
\begin{center}
% 	\begin{tikzpicture}
%     	\begin{axis}[axis lines=center, xlabel={time (sec)}, ylabel={Temperature ($^\circ$F)}, grid, xmin=0, ymin=60, ymax=165, xmax=2000, x label style={at={(axis description cs:0.5,-0.1)},anchor=north},y label style={at={(axis description cs:-0.1,.5)},rotate=90,anchor=south}]
%     		\addplot[smooth, red, thick, domain=0:2000] {94*exp(-0.00094418*x) + 66};    
%             \addlegendentry{$T(t)$ };
%             \addplot[color=black,only marks,mark=*] coordinates{(0,160)(60,155)(180,145)(210,142)(600,120)};
%             \addlegendentry{Data from Table \ref{tab:temp_color_data}};
%             \addplot[color=green,only marks, mark=*] coordinates {(345,133.86)(375,131.97)};
%             \addlegendentry{End of Steeping Times};
%             \addplot[dashed, black, domain=0:5000] {66+0*x};
%             \addlegendentry{Equilibrium ($T_{eq}=66^\circ$F)};
%         \end{axis}
%     \end{tikzpicture}
    \includegraphics[width=0.55\columnwidth]{1-094-TempPlot.eps}
\end{center}
\caption{The solution to the temperature differential equation (the red curve from
    \eqref{eqn:temp_final_soln} with $R^2 \approx 0.998$) for a total time of 30 minutes along with the data (the black points from Table \ref{tab:temp_color_data}), the time to start drinking after the tea has steeped and the sugar cube has dissolved (the green point), and the equilibrium at $T = 66^\circ$F (the dashed line). }
\label{fig:temp}
\end{figure}

\subsection*{Authors' Conclusions}
Given our solution to the temperature problem and the facts that 
\begin{itemize}
	\item it takes 4.5 minutes (270 seconds) to steep the tea according to the package directions, and 
    \item it takes 75 seconds to dissolve the sugar cube
\end{itemize}
we have a tea that is 
\[ T(270 + 75) = T(345) \approx 133.86^\circ \text{F} \]
when we start to drink.  We show the point $(345,133.86)$ in Figure \ref{fig:temp} as a
green point indicating when you can start drinking (if your mouth can handle it).  If, instead, you steep for 5 minutes (per the directions) then the tea would be $T(375) \approx 131.97^\circ$F. Lastly, given our solution to the concentration equation if you were to start drinking at $t = 345$ seconds then the tea would be at 99.7\% of the maximum concentration.  If you were to start drinking at $t = 375$ then the tea would be at 99.84\% of the maximum concentration.  These concentrations assume that you continue to steep as you dissolve the sugar cube.

\subsection*{Sample Student Approaches}
The following are two common student approaches our students used that were slightly
different than the authors' approaches.  

\begin{description}
    \item[Parameter Estimation:] Several groups did their parameter estimation by using
        the initial point and one subsequent point.  This method is highly sensitive to
        measurement error and several groups realized this.  To counter the sensitivity to
        measurement error several groups then estimated parameters from each pair of
        points and then averaged to give a final estimate.  For example, in the
        temperature problem a group used this method and found $k \approx -9.4331 \times
        10^{-4}$ in their model,
        \[ T(t) \approx 94 e^{-9.4431 \times 10^{-4} t} + 66, \]
        as compared to \eqref{eqn:temp_final_soln} where the decay rate was found to be $k
        \approx 9.4418 \times 10^{-4}$. There is no qualitative difference and only a
        small quantitative difference between these solutions. 
    \item[Using RGB:] A few groups decided to find differential equations and solutions
        for each of the $R$, $G$, and $B$ data sets.  After each of these they used
        the conversion equation (from \cite{grayscale}) to convert their three color
        curves to grayscale and compare to the grayscale data.  Groups that did this were
        more likely to notice the two incorrect data points in the grayscale conversion.
        After correcting these values in the data the $R^2$ fit for the grayscale data was
        $R^2 = 0.993$ based on the same exponential model as \eqref{eqn:sullivan_2}.
\end{description}




\section*{Common Mistakes}
We have run this activity with many student pairs.  Each pair choses to tackle the problem in a
slightly different way.  The common mistake that we saw throughout the solutions was that
many students tried to avoid the use of differential equations and instead conjectured
algebraic forms of the solutions.  Most of these groups correctly conjectured an
exponential form for the tea concentration problem and Newton's law of cooling, but they
incorrectly conjectured an exponential function for the dissolution of the sugar cube.  We
suggest emphasizing that it must be clear what differential equation was solved in every
case.  


\section*{A Coupled Model: Temperature and Grayscale}
Throughout the teacher comments we have ignored the fact that concentration and
temperature are likely coupled in this situation.  If they weren't, then why would it be
necessary to heat the water? We present here a simple coupled model, but it should be
noted that none of our students have arrived at such a model.  

If we assume that value of $\kappa$ in the grayscale model $G(t) = C_0 e^{\kappa t} + C_1$
is a function of temperature, $\kappa = \kappa(T)$, then we will arrive at a coupled model
\[ G(t) = C_0 e^{\kappa(T) t} + C_1. \]
The functional form of $\kappa(T)$ may not be known but if we assume a linear
approximation
\[ \kappa(T) = \kappa_1 + \kappa_2(T) \]
we can use the aforementioned computational tools to estimate the parameters in the model as
\[ C_0 \approx 131.013, \quad C_1 \approx 23.754, \quad \kappa_1 \approx 0.019, \quad
    \text{and} \quad
\kappa_2 \approx -0.00022, \]
and the resulting model is
\[ G(t) = 131.013 e^{(0.019-0.00022T)t}+23.754; \]
a strong fit to the data with $R^2 \approx 0.9986$.

}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


