% 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}
\usepackage{enumerate}
%
\renewcommand{\baselinestretch}{1.3}
\DeclareMathOperator{\sign}{\text{sign}}
%
% 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\\Investigating Slope Fields}



\markboth{Investigating Slope Fields}{Investigating Slope Fields}

\author{Ben Dill$^1$ and Holly Zullo$^2$\\
(1) 1115 5th Ave, Helena  MT 59601 USA\\ 
bendill3@gmail.com\\
(2) Associate Director, Research and Science\\
Huntsman Cancer
Institute\\
Salt Lake City UT 84112 USA
}



\makeStitlePDFLaTex


\begin{abstract}
Students will gain experience writing differential equations to model various population scenarios, they will create slope fields to view the solution curves using software, and they will discuss the behavior of the solution curves.  In this activity, students are introduced to the concepts of equilibrium and categorizing solutions based on qualitative behavior.  \teacher{This activity is to be used early in a differential equations course, after students have had initial exposure to basic differential equations models. This activity is also suitable for a Calculus II course that includes an introduction to differential equations. We use the dfield software \cite{Polking} to generate the slope field graphs.}
\end{abstract}

\section*{SCENARIO DESCRIPTION}

{\noindent}In this activity you will use slope fields to explore solutions to various differential equation models. Be sure to include all required equations, generated slope fields, and explanations in your lab report.
\smallskip



\begin{enumerate}

\item For each of the following scenarios (a-i), 
\begin{enumerate}[(i)]
{\setlength\itemindent{25pt} \item write a differential equation to describe the population,} 
{\setlength\itemindent{25pt} \item generate the slope field for the differential equation,}
{\setlength\itemindent{25pt} \item show {\em at least} three representative solution curves on the slope field,}
{\setlength\itemindent{25pt} \item discuss the short-term and long-term behavior of the solutions.} 
\end{enumerate}

In your lab report, for each of these scenarios, you should include the differential equation, the slope field showing solution curves (be sure this is on a reasonable window that allows you to understand the solution behavior), and your discussion of the behavior of the solution. 

Be sure the window for your slope field adequately shows the shapes and long-term behavior of the solution curves. A good general starting point for this might be to choose values between 0 and 20 for your independent variable, and between 0 and 50 for your dependent variable, but you might wish to modify these values somewhat for any given problem.

\begin{enumerate}
\item A population grows at an intrinsic rate of 8\% per year.

\item A population grows at a constant rate of 1 unit per year.

\item A population grows at an intrinsic rate of 8\% per year and has immigration of 2 per year.

\item A population grows at an intrinsic rate of 8\% per year and has initial immigration of 1 per year, decreasing linearly at rate of .2 per year.

\item A population grows at an intrinsic rate of 8\% per year and has sinusoidal immigration following the function $7\cos(\frac{\pi}{5}t)$.  You may want to play with various viewing windows on this one to be sure you understand the behavior.

\item A population declines at an intrinsic rate of 8\% per year.

\item A population declines at an intrinsic rate of 8\% per year and has immigration of 2 per year.


\item A population declines at an intrinsic rate of 8\% per year and has initial immigration of 2 per year, increasing linearly at rate of 1 per year.

\item A population declines at an intrinsic rate of 8\% per year and has sinusoidal immigration following the function $7\cos(\frac{\pi}{5}t)$.  In addition to the usual viewing window, we suggest verifying your thoughts by looking at a window of 0 to 100 for your independent variable, and -15 to 50 for your dependent variable.


\end{enumerate}

\item Plot a slope field for the differential equation $P'=0.005P(50-P)$.  A suggested interval for $P$ is $[0, 100].$ 
\begin{enumerate}
\item Discuss what sort of solution behavior you see for various initial conditions.  
\item  Notice that some initial conditions lead to similar solution behaviors.  For each qualitatively different solution behavior you observed in part (a), describe all of the initial conditions which yield similar behavior.  (For each type of qualitative behavior, you should give an interval or union of intervals.)
\item What meaning might the number 50 have in this differential equation?
\end{enumerate}


\item Plot a slope field for the differential equation $x'=-x+80-40\sign(t-6)$. Play with the viewing window until the curves are continuous on the window shown. What could this equation possibly be modeling (you could think in terms of populations, or you could use another type of scenario to describe what you see)? What behavior is caused by the last term of the differential equation, and how does that play into the scenario you describe? 

{\bf Note}: there is not a typo in sign. The sign function effectively outputs the sign of the argument.  That is, 

$$\sign(t)= \begin{cases} 
      1 & \textrm{if} \hspace{10pt} t > 0 \\
      0 & \textrm{if} \hspace{10pt} t = 0 \\
      -1 & \textrm{if} \hspace{10pt} t < 0\, . 
   \end{cases}
$$
%add citation to Terrell Notes, p. 19

\end{enumerate}



\teacher{
\section*{NOTES FOR TEACHERS}

We expect this activity to be done very early in a differential equations course, likely in the first week. The only prerequisite material is that students have learned a little about writing differential equations for various scenarios, and they will get more practice with that here. Therefore, we elected to make the best 
viewing windows fairly consistent for the various parts of problem 1. Later in the course, however, we want to focus more on finding
appropriate viewing windows. This activity is also appropriate for a Calculus II course that includes an introduction to differential equations.


\begin{enumerate}
\item 

\begin{enumerate}

\item 

\begin{enumerate}

\item $\frac{dP}{dt}=0.08P$
\item \includegraphics[width=3.25in, height=3in]{Graph1a.png}
\item see previous graph
\item The solution curves increase, appearing to show exponential growth.

\end{enumerate}

\item 

\begin{enumerate}

\item $\frac{dP}{dt}=1$
\item \includegraphics[width=3.25in, height=3in]{Graph1b.png}
\item see previous graph
\item The solution curves increase linearly.

\end{enumerate}

\item 

\begin{enumerate}

\item $\frac{dP}{dt}=0.08P+2$
\item \includegraphics[width=3.25in, height=3in]{Graph1c.png}
\item see previous graph
\item The solution curves increase, appearing to show exponential growth.

\end{enumerate}


\item 

\begin{enumerate}

\item $\frac{dP}{dt}=0.08P+1-0.2t$
\item \includegraphics[width=3.25in, height=3in]{Graph1d.png}
\item see previous graph
\item In the short term, all solutions increase. However, in the long term, students should notice that solutions with initial values below some threshhold eventually reach a maximum and begin to decrease, while solutions with a large enough initial value will always increase. The exact point of delineation is $P(0)=18.75$ because the analytical solution (which we do not expect students to know how to find at this point) is $P=(P_0-18.75)e^{0.08t}+2.5t+18.75.$
\end{enumerate}

\item 

\begin{enumerate}

\item $\frac{dP}{dt}=0.08P+7\cos\left(\frac{\pi}{5}t\right)$
\item \includegraphics[width=2.25in, height=2in]{Graph1ei.png}
 \includegraphics[width=3.25in, height=3in]{Graph1eii.png}
\item see previous graphs
\item We use two different windows here to be sure we capture both the short-term oscillatory behavior as well as the long-term behavior of increasing without oscillations. Students may be concerned that for small starting populations, this model predicts that the population will reach negative numbers and then recover. We can point out that we assume the population is extinct once it reaches zero, and so the model is only valid until that time. However, there are other scenarios, such as modeling temperature or displacement, where negative values are perfectly reasonable.


\end{enumerate}


\item 

\begin{enumerate}

\item $\frac{dP}{dt}=-0.08P$
\item \includegraphics[width=3.25in, height=3in]{Graph1f.png}
\item see previous graph
\item These solution curves decrease, appearing to show exponential decay to zero.


\end{enumerate}


\item 

\begin{enumerate}

\item $\frac{dP}{dt}=-0.08P+2$
\item \includegraphics[width=3.25in, height=3in]{Graph1gtemp.png}
\item see previous graph
\item Here we see some solution curves that decrease, and some that increase. All appear to be approaching a horizontal asymptote. Students may guess that an initial value of $P(0)=25$ will produce a constant solution that is also the asymptote the other curves are approaching, or they may find that value analytically by solving $dP/dt=0.$


\end{enumerate}


\item 

\begin{enumerate}

\item $\frac{dP}{dt}=-.08P+2+t$
\item \includegraphics[width=3.25in, height=3in]{Graph1g.png}
\item see previous graph
\item Students should notice that while all solutions increase in the long-term, some initially decrease. A challenge is to ask which values of $P(0)$ will have solutions that initially decrease. Since $dP/dt<0$ at $t=0$ if $P>25$, initial conditions with $P(0)>25$ will initially decrease for some interval before increasing.

\end{enumerate}


\item 

\begin{enumerate}

\item $\frac{dP}{dt}=0.08P+7\cos\left(\frac{\pi}{5}t\right)$
\item \includegraphics[width=2.25in, height=2in]{Graph1ii.png}
\includegraphics[width=3.25in, height=3in]{Graph1iii.png}
 \item see previous graphs
\item The initial window may leave students uncertain about the behavior, so we suggest another viewing window that should make the behavior more clear. We see that solutions initially decrease with oscillations, but eventually settle into constant oscillations. This seems to be somewhat opposite behavior to what was observed in part (e), which we know to be due to the decaying exponential present in this solution function. We hope that by comparing these two problems, students realize that the oscillations are caused by the cosine term, and they get a first introduction to transient versus long-term behavior. As with the first time they encountered oscillations that can produce negative populations, students may be concerned that this model predicts that the population will reach negative numbers and then recover. We can point out that we assume the population is extinct once it reaches zero, and so the model is only valid until that time. However, there are other scenarios, such as modeling temperature or displacement, where negative values are perfectly reasonable.


\end{enumerate}


\end{enumerate}

\item
\begin{enumerate}
\item For initial values greater than 50, the solution curves decrease toward 50.  For initial values less than 50 (and greater than 0), the solution curves increase toward 50.  If the initial value of $P$ is exactly 50, the solution curve is perfectly flat and $P$ stays at 50.  This is an opportunity to introduce the concept of stable equilibrium.  There is another equilibrium at $P=0$ that students may or may not discover.  This is also a logistic differential equation and it is worth pointing out that the solutions for initial conditions in $\left( 0,50 \right)$ are not exponential, but follow the characteristic logistic `s' shape. 

\includegraphics[width=3.25in, height=2.75in]{Graph2a.png}

\item Initial conditions in the interval $\left(50,100 \right]$ result in solution curves that decrease exponentially toward 50.  Initial conditions in the interval $\left( 0,50 \right)$ result in solution curves that increase toward 50.  The initial condition $P=50$ (and also $P=0$) yields a constant solution curve.

\item 50 is special value that $P$ approaches over time.  It represents some kind of stable value for $P$.  Various answers are possible.  The most natural is probably the carrying capacity for some population (again, this is a logistic equation!), but students may come up with creative interpretations.
\end{enumerate}

\item Various windows are possible.  The goal is to see that there is a fundamental change in behavior at $t=6$ and hopefully to also identify the different equilibrium values before and after $t=6$.

\includegraphics[width=3.25in, height=2.75in]{Graph3.png}

Again various interpretations of the equation are possible.  Your students may surprise you with their creativity!  Explanations should include some kind of sudden change at $t=6$ to account for the change in solution behavior.  Using a population-based interpretation, one could imagine a sudden event (wildfire, asteroid impact etc.) changing the available resources for some population.  In this scenario, we see that the environment could initially support 120 individuals, but after the $t=6$ catastrophe, the population settles into a new equilibrium at 40.  

The sign term in the differential equation is responsible for the shift in equilibrium.  As long as the quantity $t-6$ is negative, the differential equation is effectively $x'=-x+120$, which clearly has an equilibrium at $x=120$.  As soon as $t-6$ becomes positive, the differential equation is effectively $x'=-x+40$, which has an equilibrium at $x=40$.  This explains the sudden change in behavior at $t=6$.

This problem is from Robert Terrell's notes on differential equations \cite{Terrell}. 


\end{enumerate}



\begin{thebibliography}{99}



\bibitem{Polking} Polking, John C. Available on the world wide web at \href{http://math.rice.edu/\~dfield/dfpp.html}{http://math.rice.edu/\~dfield/dfpp.html}. Accessed 28 July 2017.

\bibitem{Terrell} Terrell, Robert.  2014. {\it Notes on Differential Equations}, Version 5, p. 19.

\end{thebibliography}
}





\end{document}
