\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{color}
\usepackage{cancel}

\setlength{\unitlength}{0.1in}

\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7.5in}

\newcommand{\comp}{ \,{\scriptstyle \stackrel{\circ}{}}\, } 
\newcommand{\nullset}{\mathrm{O}\!\!\!\!\big/\,}
\newcommand{\divides}{\,\Big|\,}
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}
\newcommand{\myspace}{\varspace{0.35in}{0.35in}}

\newcommand{\ba}[1]{\fbox{$\displaystyle #1 $}}

\begin{document}

%\pagestyle{empty}

\noindent
{\bf Math 1030 Workshop \#4} \hfill
{\bf Name: \underline{\color{red}\Large\sc\quad Answer Key \quad}}

\vspace{0.05in}

\noindent
{\Large \bf DUE: Wednesday, July 22${}^{\mbox{nd}}$} Please turn in a paper copy and
{\bf SHOW YOUR WORK!}

\vspace{0.05in}

\begin{enumerate}
   \item Use the limit definition of the derivative to find $f'(x)$ if...\\
         {}[You use should the rules we learned to double check your answer.]

   \begin{enumerate}
      \item $f(x) = 3x^2-5x+12$
      
       Note that $f\left(\ba{x+h}\right) = 3\left(\ba{x+h}\right)^2-5\left(\ba{x+h}\right)+12$.
       
       Also, $3(x+h)^2= 3(x+h)(x+h) = 3(x^2+2xh+h^2) = 3x^2+6xh+3h^2$.

%\vspace{-0.2in}

\begin{eqnarray*}
f'(x) & =  & \displaystyle \lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h} \hspace{0.15in} = \hspace{0.15in}
                   \displaystyle \lim\limits_{h \to 0} \frac{\left(3(x+h)^2-5(x+h)+12\right)-\left(3x^2-5x+12\right)}{h} \vspace{0.15in} \\
        & = & \displaystyle \lim\limits_{h \to 0} \frac{\cancel{3x^2}+6xh+3h^2-\cancel{5x}-5h+\cancel{12}-\cancel{3x^2}+\cancel{5x}-\cancel{12}}{h} \vspace{0.15in} \\
        & = & \displaystyle \lim\limits_{h \to 0} \frac{\cancel{h}\left(6x+3h-5\right)}{\cancel{h}} \hspace{0.15in} = \hspace{0.15in}
                  6x+3(0)-5
\end{eqnarray*}

%\vspace{0.1in}

\noindent {\bf Answer:} $f'(x) = 6x-5$ \qquad (This is easily verified using our formulas for differentiation.)

\vspace{0.1in}


      \item $\displaystyle{f(x) = \frac{1}{(x-2)^2}}$ \hfill Note that $\displaystyle f\left(\ba{x+h}\right) = \frac{1}{\left(\ba{x+h}-2\right)^2}$. Also, $(x+h-2)^2 = (x+h-2)(x+h-2) = x(x+h-2)+h(x+h-2)-2(x+h-2) = x^2+xh-2x+hx+h^2-2h-2x-2h+4 = x^2+2xh+h^2-4x-4h+4$.

\vspace{-0.2in}

\begin{eqnarray*}
f'(x) & =  & \displaystyle \lim\limits_{h \to 0} \frac{f(x+h)-f(x)}{h} \hspace{0.15in} = \hspace{0.15in}
                   \displaystyle \lim\limits_{h \to 0} \frac{\frac{1}{(x+h-2)^2} - \frac{1}{(x-2)^2}}{h} \vspace{0.15in}\\
        & = & \displaystyle \lim\limits_{h \to 0} \frac{\frac{1}{(x+h-2)^2}\cdot \frac{(x-2)^2}{(x-2)^2} - \frac{1}{(x-2)^2} \cdot \frac{(x+h-2)^2}{(x+h-2)^2}}{h} \hspace{0.15in} = \hspace{0.15in}
                   \displaystyle \lim\limits_{h \to 0} \frac{\frac{(x-2)^2}{(x+h-2)^2(x-2)^2} - \frac{(x+h-2)^2}{((x-2)^2(x+h-2)^2}}{h} \vspace{0.15in}\\
        & = & \displaystyle \lim\limits_{h \to 0} \frac{\frac{(x-2)^2-(x+h-2)^2}{(x+h-2)^2(x-2)^2}}{\frac{h}{1}} \hspace{0.15in} = \hspace{0.15in}       
                   \displaystyle \lim\limits_{h \to 0} \frac{x^2-4x+4-(x^2+2xh+h^2-4x-4h+4)}{h((x+h-2)^2(x-2)^2)} \vspace{0.15in}\\
        & = & \displaystyle \lim\limits_{h \to 0} \frac{\cancel{x^2}-\cancel{4x}+\cancel{4}-\cancel{x^2}-2xh-h^2+\cancel{4x}+4h-\cancel{4}}{h(x+h-2)^2(x-2)^2} 
        \hspace{0.15in} = \hspace{0.15in}  \displaystyle \lim\limits_{h \to 0} \frac{\cancel{h}(-2x-h+4)}{\cancel{h}(x+h-2)^2(x-2)^2} \vspace{0.15in}\\
        & = & \frac{(-2x-0+4)}{(x+0-2)^2(x-2)^2} \hspace{0.15in} = \hspace{0.15in}  \frac{-2(x-2)}{(x-2)^4} \hspace{0.15in} = \hspace{0.15in}  \frac{-2}{(x-2)^3} \\
\end{eqnarray*}

\vspace{-0.05in}

This result can be verified using either the quotient rule: $\displaystyle f'(x) = \frac{0(x-2)^2-1(2(x-2)^1(1))}{((x-2)^2)^2} = \frac{-2(x-2)}{(x-2)^4} = \frac{-2}{(x-2)^3}$ or using a bit of algebra: $f(x) = (x-2)^{-2}$ and then the chain rule: $f'(x) = (-2)(x-2)^{-3}(1) = \dfrac{-2}{(x-2)^3}$. Anyway we go about it we find that\dots

\vspace{0.1in}

\noindent {\bf Answer:} $f'(x) = \ba{\frac{-2}{(x-2)^3}}$

%\vspace{0.1in}


   \end{enumerate}

   \item Find the equation of the line tangent to the graph of $y = f(x)$ at $x=x_0$
         if...

   \begin{enumerate}
      \item $f(x) = 3x^2-5x+12$ and $x_0=-1$

\vspace{0.1in}

To find the equation of the tangent line we need a point and a slope. We get the point by plugging $x_0=-1$ into $f(x)$ and we get our slope by plugging $x_0=-1$ into $f'(x)$. 

First, $f(-1) = 3(-1)^2-5(-1)+12 = 3+5+12=20$. So our line passes through the point $(x,y) = (-1,20)$. 

Next, $f'(x)=6x-5$ so $f'(-1) = 6(-1)-5=-11$. So our line has slope $m=-11$.

Finally, using point-slope we get $y-20 = -11(x-(-1))$ so $y-20=-11(x+1)$ and so $y=-11x-11+20$ and thus\dots

\noindent {\bf Answer:} The equation of the tangent line is \fbox{$y=-11x+9$}.

\vspace{0.1in}

      \item $\displaystyle{f(x) = \frac{1}{(x-2)^2}}$ and $x_0=3$

\vspace{0.1in}

To find the equation of the tangent line we need a point and a slope. We get the point by plugging $x_0=3$ into $f(x)$ and we get our slope by plugging $x_0=3$ into $f'(x)$. 

First, $f(3) = \dfrac{1}{(3-2)^2} = \dfrac{1}{1^2} = 1$. So our line passes through the point $(x,y) = (3,1)$.

Next, $f'(x) = \dfrac{-2}{(x-2)^3}$ so $f'(3) = \dfrac{-2}{(3-2)^3} = \dfrac{-2}{1^3} = -2$. So our line has slope $m=-2$.

Finally, using point-slope we get $y-1 = -2(x-3)$ so $y-1=-2x+6$ and thus\dots

\noindent {\bf Answer:} The equation of the tangent line is \fbox{$y=-2x+7$}.


\vspace{0.1in}

   \end{enumerate}

   \item Compute the derivative of each of the following functions. \underline{\bf Please simplify your answers.}

   \begin{enumerate}
      \item $y = \sqrt[5]{x}+3\ln(x)+7e^x-\dfrac{11}{x^{10}}-5x+123$  % standard stuff

\vspace{0.05in}

First some algebra: $y=x^{1/5}+3\ln(x)+7e^x-11x^{-10}-5x+123$.

\[ y' = \ba{\frac{1}{5}x^{-4/5}+\frac{3}{x}+7e^x+110x^{-11}-5} \]

{\it Notes:} The derivative of each term follows from either a basic formula or the power rule. 

\vspace{0.1in}

      \item $y = e^{-4x}\ln(x)$  % product rule

\vspace{-0.25in}

\[ y' = \ba{-4e^{-4x}\ln(x) + \frac{e^{-4x}}{x}} \]

{\it Notes:} Use the product rule with first part $e^{-4x}$ and second part $\ln(x)$. We use the chain rule when differentiating $e^{-4x}$ with outside function $e^{\mathrm{BLAH}}$ and inside function $-4x$. The second term was: $e^{-4x} \cdot \dfrac{1}{x}$ which we multiplied together in the final answer.

\vspace{0.1in}

      \item $\displaystyle{y = \frac{x^2-5x+1}{xe^x}}$  % quotient rule

\vspace{0.05in}

\begin{eqnarray*}
\hspace*{0.25in} y' & = & \dfrac{(2x-5)(xe^x) - (x^2-5x+1)((1)e^x+xe^x)}{(xe^x)^2} \hspace{0.15in} = \hspace{0.15in}
                                              \dfrac{2x^2e^x-5xe^x-(x^2-5x+1)(e^x+xe^x)}{x^2(e^x)^2} \vspace{0.15in}\\
                                   & = & \dfrac{2x^2e^x-\cancel{5xe^x}-x^2e^x+\cancel{5xe^x}-e^x-x^3e^x+5x^2e^x-xe^x}{x^2(e^{x})^2} \hspace{0.15in} = \hspace{0.15in}
                                              \dfrac{-x^3e^x+6x^2e^x-xe^x-e^x}{x^2(e^{x})^2} \vspace{0.15in}\\
                                   & = & \dfrac{(-x^3+6x^2-x-1)\cancel{e^x}}{x^2(e^{x})^{\cancel{2}}} \hspace{0.15in} = \hspace{0.15in}
                                              \ba{\dfrac{-x^3+6x^2-x-1}{x^2e^{x}}} \\
\end{eqnarray*}

{\it Notes:} Use the quotient rule. Also, we need the product rule to help take the derivative of $xe^x$. The rest is algebra.


\vspace{0.05in}

      \item $\displaystyle y = \Big(\ln(3x+1)+55\Big)^{100}$  % double chain rule

\vspace{0.05in}

\[ y' = 100\Big(\ln(3x+1)+55\Big)^{99}\dfrac{1}{3x+1}(3)  = \ba{\dfrac{300\Big(\ln(3x+1)+55\Big)^{99}}{3x+1}} \]

{\it Notes:} Use the chain rule (specifically the ``generalized power rule'') with outside function $\mathrm{BLAH}^{100}$ and inside function $\ln(3x+1)+55$. To differentiate $\ln(3x+1)$ we need the chain rule again. This time $\ln(\mathrm{BLAH})$ is our outside function and $3x+1$ is our inside function.

\vspace{0.05in}

      \item $\displaystyle{y = \ln\left(\frac{4(x^5+10)^3e^{2x}}{\sqrt{x}\,(x-8)^{10}}\right)}$ % log problem

\vspace{0.05in}

First some algebra: $y = \ln\Big(4(x^5+10)^3e^{2x}\Big) - \ln\Big(\sqrt{x}\,(x-8)^{10}\Big)$ $= \ln(4) + \ln(x^5+10)^3 + \ln(e^{2x}) - \ln\Big(x^{1/2}\Big) - \ln(x-8)^{10}$

$=\ln(4) + 3\ln(x^5+10) + \cancel{\ln(e}^{\,\,2x}) - \dfrac{1}{2}\ln(x) -10\ln(x-8) = \ln(4) + 3\ln(x^5+10) + 2x - \dfrac{1}{2}\ln(x) -10\ln(x-8)$

\[ y' = 0 + 3 \frac{1}{x^5+10}(5x^4) + 2 -\dfrac{1}{2}\cdot \frac{1}{x} -10 \, \dfrac{1}{x-8}(1) = \ba{\dfrac{15x^4}{x^5+10} + 2 - \dfrac{1}{2x} - \dfrac{10}{x-8}} \]

{\it Notes:} The derivative of $\ln(4)$ is 0 since $\ln(4)$ is a constant (it has no $x$'s in it!). $3\ln(x^5+10)$ can be differentiated using the chain rule. The same is true of $-10\ln(x-8)$.

   \end{enumerate}

\end{enumerate}

\end{document}
