\documentclass[11pt]{article}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\usepackage{latexsym,amsmath,amssymb,epsfig}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{8.0in}
\begin{document}
\centerline{MATH 133 -- Calculus with Fundamentals 1}
\centerline{Piecewise-defined functions}
\centerline{September 11, 2017}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
In the video for today, we saw a real-world example of the idea of a function
defined ``piecewise'' by different formulas on different sections of its
domain.  In today's session, you will work with several more examples of these.
\vskip 10pt
\noindent
{\it Questions}
\vskip 10pt
\begin{enumerate}
\item[1)]  For each of the following piecewise-defined functions $f(x)$, sketch the graph
and determine the domain and range.  (Notes:  If values of $x$ are not covered in any of the
stated ``pieces'' or cases, they are {\it not contained} in the domain.  Each ``piece'' of these
examples will be types of functions we have seen before, so you can plot them using ideas
we have discussed before.  But there is no requirement that the ``pieces'' link up to make
a single connected graph.)  
\begin{enumerate}
\item[(a)]  The function 
            $$f(x) = \begin{cases} 1 & {\rm if}\ 1 \le x \le 2\\
                                   0 & {\rm otherwise}.  
                     \end{cases}$$
\item[(b)] The function
           $$g(x) = \begin{cases}  x^2 & {\rm if}\ -3 < x \le 0\\
                                  -x^2 & {\rm if}\ 0 < x < 3.
                    \end{cases}$$
\item[(c)]  The function 
            $$h(x) = \begin{cases} x^2 + 2x & {\rm if}\ x < 2\\
                                  -4x + 9 & {\rm if}\ x \ge 2.  
                     \end{cases}$$
\end{enumerate}
\item[2)]  Each of the following scenarios describes a car trip along a straight road joining
two cities 120 miles apart.  Mathematically, the road will be the real number line, with your 
home city at $x = 0$ and the other city is at $x = 120$.  For
each of the following scenarios,  draw a graph of the position of your car as a function of time that describes it, then try to determine piecewise formula(s) for $x$ as a function of $t$ that describe each one. You'll need to use the equation ${\rm rate} \times {\rm time} = {\rm distance}$ for straight line motion at a constant speed.
\vskip 10pt
{\it Example:}  You travel at constant speed of 45 miles per hour for one hour then, realizing you are going to be late,
you travel the rest of the way at a constant speed of 75 miles per hour for one hour.
\vskip 10pt
{\it Solution:}  At time $t = 0$ you are at your home city, so $x(0) = 0$.  One hour
later you have traveled $45$ miles, so $x(1) = 45$.  Since you are covering distance
at a constant rate, your position satisfies $x(t) = 45t$ for $0 \le t \le 1$.  
Then starting at $t = 1$, you move faster and $x(2) = 45 + 75 = 120$, so the whole
trip takes two hours.  During the second hour, your position is changing at $75$ miles per hour,
which means $x(t)$ is following a linear function $x(t) = 75(t - 1) + 45 = 75t - 30$ and the 
full formula is 
$$x(t) = \begin{cases}
              45 t & {\rm if}\ 0 \le t \le 1\\
             75t - 30 & {\rm if}\ 1 < t \le 2.
\end{cases}$$
This is plotted above in Figure 1.  
\begin{figure}
\centering
\includegraphics[height=3.0in,width=3.0in]{PositionVsTime.png}
\caption{Position vs. Time Graph}
\end{figure}
Now you try these:
\begin{enumerate}
\item[(a)]  You travel at a constant speed of 60 miles per hour for one hour, stop for half an hour while
a large flock of sheep cross the highway, then continue on at a constant speed of 60 miles per hour until you 
reached the other city.
\item[(b)]  You travel for one hour at a constant speed 60 miles per hour, then are engulfed in a dense fog.
You turn around and drive home at a constant speed of 30 miles per hour.  
\end{enumerate}  
\end{enumerate}
\end{document}
