\documentstyle{article}
\parindent=0in
\begin{document}
%\input epsf
%
{\Large
\begin{center}
Sample Midterm Exam 2 Solutions\\
\end{center}
}

Question 1  (10).
Find the derivative of the following functions: \\
a.  $ f(x) = x^8 \sin 5x $\\
Solution:\\
$f'(x) = 8x^7 \sin 5x +  x^8 (\cos 5x) 5$ by the product rule and the
chain rule.

\vspace{.2in}

b. $f(x) = (x + \sin x)^{23} $\\
Solution:\\
$f'(x) =  23(x + \sin x)^{22}(1 + \cos x)$\\
by the chain rule.

\vspace{.2in}

c.   $ f(x) = \frac{x^2 - x}{ \tan x} $\\
Solution:\\
$f'(x) = \frac{(\tan x)(2x - 1) - (\sec ^2 x) (x^2 - x)}{ \tan ^2 x} $\\  
by the quotient rule.

\vspace{.2in}

d.   $ f(x) = \frac{1 + (1/x)}{1 - (1/x)} $\\
Solution:\\
First simplify: this gives\\
$f(x) = \frac{x + 1}{x -1} $\\
Now it is easy to use the quotient rule:\\
$f'(x) = \frac{(x - 1)(1) - (x+1) (1)}{(x-1)^2} $\\
by the quotient rule.
This can be simplfied to
$ \frac{-2}{(x-1)^2} $\\
\vspace{.2in}

e.   $ f(x) = (2x+1)^7 (3x+1)^5 $ \\
Solution:\\
$f'(x) = 7(2x+1)^6(2) (3x+1)^5 +  5(3x+1)^4(3) (2x+1)^7$\\
by the product and chain rules.

\vspace{.2in}

Question 2  (15).  
a. State the definition of the derivative of a function $f$ at a point $x$.\\

$ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)} {h} $, if this limit exists.

\vspace{.2in}

b.  Use the definition of the derivative to compute $f'(x)$ for
$  f(x) = \frac{2}{x}$.\\
$ \frac{f(x+h) - f(x)} {h}  =  \frac{\frac{2}{x+h} - \frac{2}{x}} {h} \\
= \frac{-2} {(x+h)x}$\\
Taking the limit of this as $h \to 0$, we obtain
$fÕ(x) = \frac{-2}{x^2}$. 

\vspace{.2in}

Question 3  (10).
Find all the vertical and horizontal asymptotes of the graph of
$  f(x) = \frac{x^2 - 2x + 1}{x^2 - 1}$\\
We first notice that there is a simplification,\\
$  f(x) = \frac{x - 1}{x + 1}$\\
Then we see that there is a vertical asymptote at $x=-1$.
As $x \to \infty$, we have $f(x) \to 1$, and similarly for
$x\to -\infty$. So there is one horizontal asymptote, $y=1$, for both
$x \to \infty$ and $x \to -\infty$.

\vspace{.2in}

Question 4  (20). 
For each of the following, either find the limit or state that 
"no limit exists" and briefly explain why.
Show work used to get your answer.

a. $ \lim_{x \to 0} \frac{2 + 3\sin x} {x^3 + 1} $\\
Answer: 2.  The limit can be obtained by plugging in, since this does
not lead to division by zero or other problems, and the numerator and denominator are continuous.
\vspace{.2in}

b. $ \lim_{x \to \infty} \cos x$.\\

Does not exist, since $\cos x$ oscillates between -1 and 1 and does not
approach a single value.
\vspace{.2in}

c. $ \lim_{x \to \infty} \frac{\cos x}{x^2 - \sin x} $.\\
Answer: 0, since $|\frac{\cos x}{x^2 - \sin x} | \le \frac{1}{x^2 - 1} $
for $x$ large, and this approaches zero as $x \to \infty$.
\vspace{.2in}

d. $ \lim_{x \to 2} \frac {x^2 - 4} { x-2}$. \\

Answer: 4, since $\frac {x^2 - 4} { x-2} = (x+2)$ when $x \neq 2$,
and $\lim_{x \to 2}  { x+2} = 4.$
\vspace{.2in}

Question 5  (10).
For the function $f(x) = x^2 + 2 \tan x - 2 $

a. Find the equation of the tangent line to the graph of $f(x)$ at
the point (0,-2).\\
$f'(x) = 2x + 2\sec ^2 (x)$ and at $x=0$ this has value $f'(0) =2\sec ^2 (0) = 2$.
So the line has slope 2 and goes through the point (0,-2).  Using the point-sl
ope formula gives the equation \\
$ y - (-2) = 2 (x - 0)$ or $y = 2x - 2$.
\vspace{.2in}

b. Show that $f(x) = 0$ at some point. \\
We know that $f(0) = -2$ and $f(\pi/4) = (\pi/4)^2 + 2 - 2 =  (\pi/4)^2 > 0$.
The function $f(x)$ is continuous on the interval $[0,\pi/4]$, so by the Intermediate Value Theorem, there is a point in this interval where $f(x) = 0.$
\vspace{.2in}

Question 6  (10)
a. State the precise definition of what is meant by $ \lim_{x \to a} f(x) = 
L$.\\
Given an $\epsilon > 0$ there is a $\delta $  such that whenever
$0 < |x-a| < \delta$ then it is true that $|f(x) - L| < \epsilon$.
\vspace{.2in}

Use the precise definition of the limit to prove that $ \lim_{x \to 0} 5 x^2 
- 4  = -4$. \\
To ensure that $|f(x) -4| < \epsilon$, or $|(5 x^2 - 4 ) -4| < \epsilon$, what
$x$ can we allow?  Simplifying gives $|5x^2| < \epsilon$, or
$|x| < \sqrt {\frac {\epsilon}{5}}$.
So we pick
$\delta = \sqrt {\frac {\epsilon}{5}}$
and we satisfy the condition for the limit to equal 4.
\vspace{1.5in}

Question 7  (5)
Give an example of a function $f(x)$ which is continuous at $x=1$ but
not differentiable at $x=1$. \\

The function $f(x) = |x-1|$ is an example.
  
\vspace{.2in}

Question 8  (5)
Suppose $f$ and $g$ are functions and $f(3) = 2,\  f'(3) = 4,\  g(5) = 3,\  
g'(5) = 7.$
Where can you calculate the derivative of $f \circ g$? What is it equal to?\\
At $x=5$, the chain rule tells us that
$(f \circ g)'(5) = (f'(g(5))(g'(5) = f'(3)(7) = (4)(7) = 28$

\vspace{.2in}

Question 9  (5)
Let $f(x) = \sqrt[4] {x^5} $. Find $f'(16)$.\\
By the chain rule, $f'(x) = (5/4) x^ {1/4}$ and $f'(16) = (5/4)((16)^ {1/4} = 5/2.$
\vspace{.2in}

Question 10  (10).
Find an anti-derivative of the following functions: \\
a.  $ f(x) = 5/x^2  $.\\
$F(x) = -5x^{-1}$.
\vspace{.2in}

b.  $ f(x) = 3  \sin x $\\
$F(x) = -3 \cos x$.

\vspace{.2in}

c.  $ f(x) =  \csc x \cot x $\\
$F(x) = - \csc x$.
 
\end{document}
