\documentclass[10pt,a4paper]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{pgfplots}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx,ragged2e}
\usepackage{hyperref}
\usepackage{color}
\usepackage{tabularx,ragged2e}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\newcommand{\dd}{\mathrm{d}}
\renewcommand*{\arraystretch}{2}
\begin{document}

\begin{coverpages}
\begin{center}\huge MATH 1190 - EXAM 1 FALL 2016\\
\huge SOLUTION\\
\end{center}

\begin{flushleft}\vspace{0.5in}
Friday 9 September 2016 \\
Instructor: Tom Cuchta
\end{flushleft}

\textbf{Instructions:}
\begin{itemize}
	\item  Show all work, clearly and in order, if you want to get full
	credit. If you claim something is true \textbf{you must show work backing up your claim}. I reserve the right to take off points if I cannot see how you arrived at your answer (even if your final answer is correct).
	\item Justify your answers algebraically whenever possible to ensure full credit. 	
	\item  Circle or otherwise indicate your final answers.
	\item  Please keep your written answers brief; be clear and to the point.
	\item  Good luck!
\end{itemize}
\vspace*{10pt}


\end{coverpages}

\begin{questions}
\question[10] Circle \textbf{T} for true and \textbf{F} for false.
	\begin{parts}
		\part[2] \circled{\textbf{T}} \hspace{5pt} \textbf{F} \hspace{5pt} All polynomial functions are continuous. \\
		\textit{Explanation:} This was mentioned in class and also appears on pg.75 in the book. 
		\part[2] \textbf{T}\hspace{5pt} \circled{\textbf{F}} \hspace{5pt} The derivative of $\cos(x)$ is $\sin(x)$. \\
		\textit{Explanation:} The derivative of $\cos(x)$ {\color{blue} \href{http://www.wolframalpha.com/input/?i=derivative+of+cos(x)}{is}} 
		$$\dfrac{\dd}{\dd x} \cos(x) = -\sin(x).$$
		\part[2] \circled{\textbf{T}} \hspace{5pt} \textbf{F} \hspace{5pt} $\displaystyle\lim_{x \rightarrow -\infty} x^2=-\infty$ \\
		\textit{Explanation:} This limit {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E-infinity+of+x%5E2}{is}} $+\infty$ because $x^2$ is always positive (draw its graph and observe). \\
		\part[2] \textbf{T}\hspace{5pt} \circled{\textbf{F}} \hspace{5pt} The derivative of a constant function is $\infty$. \\
		\textit{Explanation:} Don't forget that the derivative describes the slope. The slope of a horizontal line is $0$, so the derivative is $0$. You may also see this using the power rule if you recall $1=x^0$ so that a constant $c$ obeys $c=c x^0$. Or you may simply recall Theorem~2.2 on pg. 106. 
		\part[2] \circled{\textbf{T}} \hspace{5pt} \textbf{F} \hspace{5pt} $\displaystyle\lim_{x \rightarrow 0} x^2 \sin \left(\dfrac{1}{x} \right)=0$ \\
		\textit{Explanation:} This fact follows from the squeeze theorem: the sine function obeys
		$$-1 \leq \sin(\theta) \leq 1,$$
		and so for $\theta= \dfrac{1}{x}$ we get
		$$-1 \leq \sin \left( \dfrac{1}{x} \right) \leq 1.$$
		Multiplying by $x^2$ yields
		$$-x^2 \leq x^2 \sin \left( \dfrac{1}{x} \right) \leq x^2.$$
		Now by the squeeze theorem, since 
		$$\displaystyle\lim_{x \rightarrow 0} -x^2 = \displaystyle\lim_{x \rightarrow 0} x^2 = 0,$$
		we must conclude that
		$$\displaystyle\lim_{x \rightarrow 0} x^2 \sin \left( \dfrac{1}{x} \right)=0.$$
	\end{parts}
\newpage
\question[10] Consider the following graph of the function $f(x)$ and deduce the value of the following expressions, if they exist. If they do not exist, explain why. \\
\begin{tikzpicture}
		\begin{axis}[
		axis x line=middle, 
		axis y line=middle,
		ymax=10]
		\addplot[domain=-3:-1,samples=100,very thick]{x^2-1};
		\addplot[domain=1.01:3,samples=100,very thick]{1/(x-1)};
		\addplot[domain=-1:1,samples=100,very thick]{x^2+3};
		\end{axis}
%		\node at (3.45,-0.5) {\textbf{\Large{A}}};
		\draw[black,fill=white] (2.3,0) circle (.5ex);
		\draw[black,fill=white] (2.3,2.25) circle (.5ex);
		\draw[black,fill=black] (2.3,1.15) circle (.5ex);
		\draw[dashed] (4.567,0) -- (4.567,5.9);
		\draw[black,fill=white] (4.567,2.25) circle (.5ex);
\end{tikzpicture}
	\begin{parts}
		\part[2] $f(-1)$ \\
		\textit{Solution:} $f(-1)=2$ because of the filled in hole lying above $x=-1$ at height $2$
		\part[2] $\displaystyle\lim_{x \rightarrow -1^-} f(x)$ \\
		\textit{Solution:} This limit is $0$ because as $x \rightarrow -1$ from the left, the height of the function is approaching the height of the bottom hole at $x=-1$ which is at height $0$. 
		\part[2] $\displaystyle\lim_{x \rightarrow -1^+} f(x)$ \\
		\textit{Solution:} The limit is $4$ because as $x \rightarrow -1$ from the right, the height of the function is approaching the height of the top hole at $x=-1$ which is at height $4$. 
		\part[2] $\displaystyle\lim_{x \rightarrow 1^-} f(x)$ \\
		\textit{Solution:} The limit is $4$ because as $x \rightarrow 1$ from the left, the height of the function is approaching the height of the hole at $x=1$ at height $4$. 
		\part[2] $\displaystyle\lim_{x \rightarrow 1^+} f(x)$\\
		\textit{Solution:} The limit does not exist (writing that it equals $\infty$ would also receive credit) because as $x \rightarrow 1$ from the right, the height of the function grows unboundedly as it approaches the asymptote.
	\end{parts}

\question[15] Compute the limit. \textbf{Justify your answer.}
	\begin{parts}
		\part[5] $\displaystyle\lim_{x \rightarrow 4} \dfrac{x-4}{x^2-16}$ \\
		\textit{Solution:} Naively plugging in $x=4$ yields the indeterminate form $\dfrac{0}{0}$, meaning there is more work to do. What we do here is algebraically simplify the function by factoring (using a difference of squares) a follows:
		$$\dfrac{x-4}{x^2-16} = \dfrac{x-4}{(x-4)(x+4)} = \dfrac{1}{x+4}.$$
		Therefore we may {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E4+of+(x-4)%2F(x%5E2-16)}{compute}}
		$$\displaystyle\lim_{x \rightarrow 4} \dfrac{x-4}{x^2-16} = \displaystyle\lim_{x \rightarrow 4} \dfrac{1}{x+4} = \dfrac{1}{4+4} = \dfrac{1}{8}.$$
		\part[5] $\displaystyle\lim_{x \rightarrow 7} \dfrac{\sqrt{x+2}-3}{x-7}$ \\
		\textit{Solution:} Naively plugging in $x=7$ yields the indeterminate form
		$$\dfrac{\sqrt{7+2}-3}{7-7} = \dfrac{\sqrt{9}{-3}}{0} =\dfrac{3-3}{0} = \dfrac{0}{0},$$
		meaning there is more work to do. What we do here is algebraically simplify the function by multiplying by its conjugate as follows:
		$$\begin{array}{ll}\
		\dfrac{\sqrt{x+2}-3}{x-7} &= \dfrac{(\sqrt{x+2}-3)}{x-7} \dfrac{(\sqrt{x+2}+3)}{\sqrt{x+2}+3} \\
		&=\dfrac{(x+2)-9}{(x-7)(\sqrt{x+2}+3)} \\
		&= \dfrac{x-7}{(x-7)(\sqrt{x+2}+3)} \\
		&= \dfrac{1}{\sqrt{x+2}+3}.
		\end{array}$$
		Therefore we may {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E7+of+(sqrt(x%2B2)-3)%2F(x-7)}{compute}}
		$$\displaystyle\lim_{x \rightarrow 7} \dfrac{\sqrt{x+2}-3}{x-7} = \displaystyle\lim_{x \rightarrow 7} \dfrac{1}{\sqrt{x+2}+3}=\dfrac{1}{\sqrt{7+2}+3} = \dfrac{1}{6}.$$
		\part[5] $\displaystyle\lim_{x \rightarrow 0} \dfrac{7\sin(x)}{x}$ \\
		\textit{Solution:} Recall the ``special" trigonometric limit $\displaystyle\lim_{x \rightarrow 0} \dfrac{\sin(x)}{x}=1$. Therefore we may use the fact that constants pull out of limits (Theorem~1.2 part 1, pg.59 in the book) to {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E0+of+(7*sin(x))%2Fx}{compute}}
		$$\displaystyle\lim_{x \rightarrow 0} \dfrac{7 \sin(x)}{x} = 7 \left( \displaystyle\lim_{x \rightarrow 0} \dfrac{\sin(x)}{x} \right)=7 \cdot 1 = 7.$$
	\end{parts}
\question[10] Find the value of $a$ that makes the function 
$$f(x) = \left\{ \begin{array}{ll}
x^2 & \quad x<2 \\
ax+2 & \quad x \geq 2
\end{array} \right.$$
continuous at $x=2$. \\
\textit{Solution:} Continuity of $f(x)$ at a point $c$ is defined (pg. 70 in the book) by the following three properties:
\begin{enumerate}
\item $f(c)$ is defined,
\item $\displaystyle\lim_{x \rightarrow c} f(x)$ exists, and
\item $\displaystyle\lim_{x \rightarrow c} f(x) = f(c)$.
\end{enumerate}
We are told the function $f$ and are asked about continuity at the point $c=2$. Since this function is piecewise, we will have to consider the limit from both sides and decide what $a$ is from Theorem~1.10 which says a limit exists if and only if the limit from the left and the limit from the right agree. So first compute the limit from the left as $x \rightarrow 2$:
$$\displaystyle\lim_{x \rightarrow 2^-} f(x) = \displaystyle\lim_{x \rightarrow 2^-} x^2 = 2^2 = 4,$$
and compute the limit from the right as $x \rightarrow 2$:
$$\displaystyle\lim_{x \rightarrow 2^+} f(x) = \displaystyle\lim_{x \rightarrow 2^+} ax+2 = 2a+2.$$
From the definition of $f$, property 1. of continuity holds because 
$$f(2) = 2a+2.$$
To force properties 2. and 3. to hold we must force
$$\displaystyle\lim_{x \rightarrow 2^-} f(x) = \displaystyle\lim_{x \rightarrow 2^+} f(x),$$
or as we have computed,
$$4 = 2a+2.$$
Solving this for $a$ {\color{blue} \href{http://www.wolframalpha.com/input/?i=solve+4%3D2a%2B2}{yields}}
$$a=1.$$

\question[5] Does the following limit tend to $\infty$ or $-\infty$? \textbf{Explain why.}
$$\displaystyle\lim_{x \rightarrow 5^-} \dfrac{1}{x-5}.$$ 
\textit{Solution:} Since the graph of this function is \\
\begin{tikzpicture}
		\begin{axis}[
		axis x line=middle, 
		axis y line=middle,
		ymax=10]
		\addplot[domain=-2:4.9,samples=100,very thick]{1/(x-5)};
		\addplot[domain=5.1:7,samples=100,very thick]{1/(x-5)};
		\end{axis}
		\draw[dashed] (5.35,-0.1) -- (5.35,5.7);
\end{tikzpicture} \\
we {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E5+from+the+left+of+1%2F(x-5)}{see}}
$$\displaystyle\lim_{x \rightarrow 5^-} \dfrac{1}{x-5} = -\infty.$$
\question[10] Compute the limits.
		\begin{parts}
		\part[5] $\displaystyle\lim_{x \rightarrow -\infty} \dfrac{1}{x^3+2x^2+7}$ \\
		\textit{Solution:} Since the highest power of $x$ that appears is the third power, we multiply the inside by $\dfrac{\frac{1}{x^3}}{\frac{1}{x^3}}$ to get
		$$\dfrac{1}{x^3+2x^2+7} \dfrac{\frac{1}{x^3}}{\frac{1}{x^3}} = \dfrac{\frac{1}{x^3}}{1+\frac{2}{x} + \frac{7}{x^3}}.$$
		Now using Theorem~3.10 (pg. 196) we see
		$$\displaystyle\lim_{x \rightarrow -\infty} \dfrac{1}{x^3} = \displaystyle\lim_{x \rightarrow -\infty} \dfrac{2}{x} = \displaystyle\lim_{x \rightarrow -\infty} \dfrac{7}{x^3}=0.$$
		Therefore we may {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3E-infiniy+of+(1%2Fx%5E3)%2F(1%2B2%2Fx%2B7%2Fx%5E3)}{compute}}
		$$\displaystyle\lim_{x \rightarrow -\infty} \dfrac{1}{x^3 + 2x^2+7} = \displaystyle\lim_{x \rightarrow -\infty} \dfrac{\frac{1}{x^3}}{1+\frac{2}{x} + \frac{7}{x^3}} = \dfrac{0}{1+0+0} = \dfrac{0}{1} = 0.$$
		Note: you may also simply jump to claiming the solution is zero by noting that the polynomial on the bottom has higher degree (three) than the polynomial on top (which has degree zero).
		\part[5] $\displaystyle\lim_{x \rightarrow \infty} \dfrac{x+3}{\sqrt{x^2+2x+9}}$ \\
		\textit{Solution:} In this case the highest power of $x$ that ``appears" is power $1$ because the $x^2$ in the denominator is under a square root. Note that $\dfrac{1}{x}=\sqrt{\dfrac{1}{x^2}}$. Thus we will multiply by $\dfrac{\frac{1}{x}}{\frac{1}{x}}$ to get
		$$\dfrac{x+3}{\sqrt{x^2+2x+9}} = \dfrac{x+3}{\sqrt{x^2+2x+9}} \dfrac{\frac{1}{x}}{\frac{1}{x}} = \dfrac{1+\frac{3}{x}}{\sqrt{1+\frac{2}{x}+\frac{9}{x^2}}}.$$
		By Theorem~3.10 (pg. 196) we see
		$$\displaystyle\lim_{x \rightarrow \infty} \dfrac{3}{x}=\displaystyle\lim_{x \rightarrow \infty} \dfrac{2}{x} = \displaystyle\lim_{x \rightarrow \infty} \dfrac{9}{x^2}=0.$$
		Therefore we may {\color{blue} \href{http://www.wolframalpha.com/input/?i=limit+as+x-%3Einfinity+of+(x%2B3)%2Fsqrt(x%5E2%2B2x%2B9)}{compute}}
		$$\displaystyle\lim_{x \rightarrow \infty} \dfrac{x+3}{\sqrt{x^2+2x+9}} = \displaystyle\lim_{x \rightarrow \infty} \dfrac{1+\frac{3}{x}}{\sqrt{1 + \frac{2}{x} + \frac{9}{x^2}}}=\dfrac{1+0}{\sqrt{1+0+0}} = \dfrac{1}{\sqrt{1}} = 1.$$
	\end{parts}
\question[10] Compute the derivative of the function $f(x)=x^2+1$ \textbf{using the limit definition}. \\
\textit{Solution:} Recall the definition of the derivative (pg.99 in the book):
$$f'(x) = \displaystyle\lim_{h \rightarrow 0} \dfrac{f(x+h)-f(x)}{h}.$$
For our function $f$,
$$f(x+h) = (x+h)^2+1 = x^2+ 2xh + h^2 + 1,$$
so we {\color{blue}\href{http://www.wolframalpha.com/input/?i=derivative+of+x%5E2%2B1}{compute}}
$$\begin{array}{ll}
f'(x) &= \displaystyle\lim_{h \rightarrow 0} \dfrac{f(x+h)-f(x)}{h} \\
&= \displaystyle\lim_{h \rightarrow 0} \dfrac{[x^2+2xh+h^2+1] - [x^2+1]}{h} \\
&= \displaystyle\lim_{h \rightarrow 0} \dfrac{2xh+h^2}{h} \\
&= \displaystyle\lim_{h \rightarrow 0} 2x+h \\
&= 2x.
\end{array}$$
\question[10] Compute the derivative of the function using any method you wish.
	\begin{parts}
		\part[5] $f(x)=2x^2+9x+15$ \\
		\textit{Solution:} Using the the constant rule, the power rule, the the constant multiple rule, and the sum rule  (Theorem~2.2 pg. 106, Theorem~2.3 pg. 107, Theorem~2.4 pg. 109, and Theorem~2.5 pg. 110 respectively), we {\color{blue} \href{http://www.wolframalpha.com/input/?i=derivative+of+2x%5E2%2B9x%2B15}{compute}}
		$$\begin{array}{ll}
		f'(x) &= \dfrac{\dd}{\dd x} \left[ 2x^2+9x+15 \right] \\
		&= \dfrac{\dd}{\dd x} 2x^2 + \dfrac{\dd}{\dd x} 9x + \dfrac{\dd}{\dd x} 15 \\
		&= 2 \dfrac{\dd}{\dd x} x^2 + 9 \dfrac{\dd}{\dd x} x + 0 \\
		&=2 (2x) + 9(1) \\
		&= 4x + 9.
		\end{array}$$
		\part[5] $f(x)=3\sin(x)+\dfrac{1}{x}$ \\
		\textit{Solution:} We use Theorem~2.6 pg. 111 (the derivative of $\sin(x)$ is $\cos(x)$) along with the power rule, constant multiple rule, and the sum rule to {\color{blue} \href{http://www.wolframalpha.com/input/?i=derivative+of+3*sin(x)+%2B+1%2Fx}{compute}}
		$$f'(x) = 3 \dfrac{\dd}{\dd x} [\sin(x)] + \dfrac{\dd}{\dd x} [x^{-1}] = 3 \cos(x) - x^{-2} = 3\cos(x) - \dfrac{1}{x^2}.$$
	\end{parts}
\newpage
\question[10] Find an equation of the tangent line of the function $f(x)=2x^2+5x-3$ at the point $(1,4)$. \\
\textit{Solution:} Recall the ``point-slope" form of the equation of line with slope $m$ through the point $(x_1,y_1)$:
$$y-y_1 = m(x-x_1).$$
We are told the point $(x_1,y_1)=(1,4)$, but we must find the slope. The slope will be given by the derivative of $f$ at the $x$-value $1$. So first {\color{blue} \href{www.wolframalpha.com/input/?i=derivative+of+3*sin(x)+%2B+1%2Fx}{compute}}
$$f'(x) = 4x+5.$$
Now substitute $x=1$ into $f'$ to get
$$f'(1)=4 \cdot 1 + 5 = 4 + 5 = 9,$$
which is our slope. Now we use the slope-intercept form of the line with $(x_1,y_1)=(1,4)$ and $m=9$ to get the equation
$$y-4 = 9(x-1),$$
or written in an {\color{blue} \href{www.wolframalpha.com/input/?i=derivative+of+3*sin(x)+%2B+1%2Fx}{equivalent way}} (i.e. ``slope-intercept" form),
$$y= 9x - 5.$$
Note: either form of the equation of the line is acceptable for full credit, but some people made a mistake in converting the point-slope form into slope-intercept form.
\question[10] Explain why the function $f(x)=x^2-3x+1$ has a zero in the interval $[0,1]$. \\
\textit{Solution:} We will proceed using the intermediate value theorem (Theorem~1.13 pg.77): first compute
$$f(0)=0^2-3\cdot 0 + 1 = 0+0+1 = 1,$$
and compute 
$$f(1)=1^2 - 3 \cdot 1 + 1 = 1 - 3 +1 = -1.$$
We are trying to show there is a number $c$ with the property that $0 < c < 1$ and $f(c)=0$ (i.e. $c$ is a zero of $f$ in the interval $[0,1]$). Since $f(0) = 1 > 0$ and $f(1) = -1 < 0$ the intermediate value theorem guarantees such a number $c$ exists. \\
Note: we do not have to find the precise value of $c$, which is in fact $c=\dfrac{3-\sqrt{5}}{2}$, but the theorem guarantees it is actually there and that is good enough for this problem.
\end{questions}
\end{document}
