\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{Solutions for Quiz 2 -- September 15, 2017}
\vskip 40pt
\noindent
\begin{enumerate}
\item[1)]  (15)  In the space below, plot the piece-wise defined function 
$$f(x) = \begin{cases}
            x + 3 &\ {\rm if}\ -1 < x < 1 \\
            x^2 -4x + 2&\ {\rm if}\ 1 \le x < 3.
         \end{cases}
$$
Assume the domain is just the interval $(-1,3)$ indicated.

\vskip 10pt
\noindent
{\it Solution:}
\vskip 10pt
The portion of the graph between $x = -1$ and $x = 1$ is a part of the 
straight line $y = x+3$.  This has slope $m = 1$ and $y$-intercept $3$, 
so it goes through the point $(0,3)$.  We {\it only} get the part of that
line starting at $(-1,2)$ and ending at $(1,4)$.  The endpoints are shown
with open circles because $x = -1$ and $x = 1$ are not included in this
part of the domain.  

At $x = 1$, the formula changes to $f(x) = x^2 - 4x + 2$.
Completing the square, we have that half of the coefficient of the $x$ is
$-4/2 = - 2$ and $(x - 2)^2 = x^2 - 4x + 4$.
Therefore $x^2 - 4x + 2 = (x - 2)^2 - 2$.
Therefore, this portion of the graph is a piece of a shifted parabola.  The 
shifts are 2 units to the right and 2 units down.  
The vertex (lowest point) is at $(2,-2)$.  As for the line, we only get
the part of the parabola for $1 \le x < 3$.  See Figure 1 on the back.  
\begin{figure}
\begin{center}
\includegraphics[width=3.0in]{Quiz2Problem1.png}
\end{center}
\caption{$y = f(x)$ from question 1.}
\end{figure}
\begin{figure}
\begin{center}
\includegraphics[width=3.0in]{sinusoid.png}
\end{center}
\caption{A sinusoidal function}
\end{figure}
\item[2)] (15) Find a formula for the sinusoidal function plotted in Figure 2 on the back.
\vskip 10pt
\noindent
{\it Solution:}
\vskip 10pt
If we think of placing the start of period at $x = 0$, then this looks like a cosine graph.  
The maximum $y$-value is $0$ and the minimum is $-8$, so the amplitude is
$\frac{0 - (-8)}{2} = 4$.  The vertical shift is the distance $0 - 4 = -4$.  The
period of the oscillation is $\pi$, so the multiplier $B$ in the general formula 
$y = A \cos(Bx) + C$ is $B = \frac{2\pi}{\pi} = 2$.  So one formula is
$$y = 4 \cos(2x) - 4.$$
(There are other correct ones too, but this one is the simplest!)
\end{enumerate}
\end{document}
