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

\usepackage{amssymb}
\usepackage{hyperref}

\newcommand{\ALPHA}{\checkmark} 


\setlength{\unitlength}{0.1in}

\setlength{\oddsidemargin}{-0.50in}
\setlength{\evensidemargin}{-0.50in}
\setlength{\topmargin}{-0.50in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.4in}
\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}}
\begin{document}

%\pagestyle{empty}

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

\vspace{0.05in}

\noindent
{\Large \bf DUE: Friday, 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) = -4x^2+2x-1$  \qquad then $\displaystyle f'(x) = \lim\limits_{h \to 0} \dfrac{f(x+h)-f(x)}{h} =  $
$$\hspace*{-0.75in} 
    \lim\limits_{h \to 0} \dfrac{\left[-4(x+h)^2+2(x+h)-1\right]-\left[-4x^2+2x-1\right]}{h} 
 = 
    \lim\limits_{h \to 0} \dfrac{\left[-4(x^2+2xh+h^2)+2(x+h)-1\right]-\left[-4x^2+2x-1\right]}{h} = $$
$$\hspace*{-0.75in} 
    \lim\limits_{h \to 0} \dfrac{\left[-4x^2-8xh-4h^2+2x+2h-1\right]-\left[-4x^2+2x-1\right]}{h}
 = 
    \lim\limits_{h \to 0} \dfrac{{\color{red}-4x^2}-8xh-4h^2{\color{green}+2x}+2h{\color{blue}-1}+{\color{red}4x^2}{\color{green}-2x}{\color{blue}+1}}{h} = 
$$
$$\hspace*{-0.75in} 
    \lim\limits_{h \to 0} \dfrac{-8xh-4h^2+2h}{h} = \lim\limits_{h \to 0} \dfrac{{\color{red}h}(-8x-4h+2)}{\color{red}h}
   =\lim\limits_{h \to 0} -8x-4h+2 = -8x-4(0)+2 = \mbox{\fbox{$-8x+2$}}$$

{}[Of course, we can easily check this using linearity and the power rule: $f'(x) = -4(2x)+2 = -8x+2$.]

\vspace{0.05in}

      \item $f(x) = \dfrac{1}{\sqrt{x}}$  \qquad then $\displaystyle f'(x) = \lim\limits_{h \to 0} \dfrac{f(x+h)-f(x)}{h} =  $

$$\hspace*{-0.75in} 
    \lim\limits_{h \to 0} \dfrac{\dfrac{1}{\sqrt{x+h}} - \dfrac{1}{\sqrt{x}}}{h} = 
    \lim\limits_{h \to 0} \dfrac{\dfrac{1}{\sqrt{x+h}} \cdot \dfrac{\sqrt{x}}{\sqrt{x}} - \dfrac{1}{\sqrt{x}} \cdot \dfrac{\sqrt{x+h}}{\sqrt{x+h}}}{h} = 
   \lim\limits_{h \to 0} \dfrac{\dfrac{\sqrt{x}}{\sqrt{x+h}\sqrt{x}} - \dfrac{\sqrt{x+h}}{\sqrt{x}\sqrt{x+h}}}{h} = 
   \lim\limits_{h \to 0} \dfrac{\dfrac{\sqrt{x}-\sqrt{x+h}}{\sqrt{x+h}\sqrt{x}}}{h} = 
$$
Let's pause to comment on the line above. We start with the limit definition applied to our function. Then in order to bring the fractions in the numerator together we force a common denominator (i.e. $\sqrt{x} \cdot \sqrt{x+h}$). Then with common denominator in hand we can combine these fractions. 
$$\hspace*{-0.75in} 
   \lim\limits_{h \to 0} \dfrac{\dfrac{\sqrt{x}-\sqrt{x+h}}{\sqrt{x+h}\sqrt{x}}}{\dfrac{h}{1}} = 
   \lim\limits_{h \to 0} \dfrac{\sqrt{x}-\sqrt{x+h}}{\sqrt{x+h}\sqrt{x}} \cdot \dfrac{1}{h} = 
   \lim\limits_{h \to 0} \dfrac{\sqrt{x}-\sqrt{x+h}}{\sqrt{x+h}\,\sqrt{x}\cdot h} = 
   \lim\limits_{h \to 0} \dfrac{\sqrt{x}-\sqrt{x+h}}{\sqrt{x+h}\,\sqrt{x}\cdot h} \cdot \dfrac{\sqrt{x}+\sqrt{x+h}}{\sqrt{x}+\sqrt{x+h}} =  
$$
In the above line we have performed a division of fractions. The last step is the beginning of what we call ``the conjugate trick''. This will allow (eventually) to cancel off the $h$ in the denominator.
$$\hspace*{-0.75in} 
   \lim\limits_{h \to 0} \dfrac{(\sqrt{x}-\sqrt{x+h})(\sqrt{x}+\sqrt{x+h})}{\sqrt{x+h}\,\sqrt{x}\cdot h \cdot (\sqrt{x}+\sqrt{x+h})} =  
   \lim\limits_{h \to 0} \dfrac{(\sqrt{x})^2{\color{red}-\sqrt{x}\sqrt{x+h}+\sqrt{x+h}\sqrt{x}}-(\sqrt{x+h})^2}{\sqrt{x+h}\,\sqrt{x}\cdot h \cdot (\sqrt{x}+\sqrt{x+h})} =    
$$
$$\hspace*{-0.75in} 
   \lim\limits_{h \to 0} \dfrac{(\sqrt{x})^2-(\sqrt{x+h})^2}{\sqrt{x+h}\,\sqrt{x}\cdot h \cdot (\sqrt{x}+\sqrt{x+h})} =    
   \lim\limits_{h \to 0} \dfrac{x-(x+h)}{\sqrt{x+h}\,\sqrt{x}\cdot h \cdot (\sqrt{x}+\sqrt{x+h})} =    
   \lim\limits_{h \to 0} \dfrac{{\color{red}x-x}-h}{\sqrt{x+h}\,\sqrt{x}\cdot h \cdot (\sqrt{x}+\sqrt{x+h})} =    
$$
$$\hspace*{-0.75in} 
   \lim\limits_{h \to 0} \dfrac{-1 \cdot {\color{red}h}}{\sqrt{x+h}\,\sqrt{x}\cdot {\color{red}h} \cdot (\sqrt{x}+\sqrt{x+h})} =    
   \lim\limits_{h \to 0} \dfrac{-1}{\sqrt{x+h}\,\sqrt{x} (\sqrt{x}+\sqrt{x+h})} =    
  \dfrac{-1}{\sqrt{x+0}\,\sqrt{x} (\sqrt{x}+\sqrt{x+0})} =    
$$
In our next to last step we finally canceled off the $h$ in the denominator. This means we can plug in $h=0$ without having a division by zero issue. Now all that is left is to do some simplification.
$$
  \dfrac{-1}{\sqrt{x}\,\sqrt{x} (\sqrt{x}+\sqrt{x})} = \dfrac{-1}{x (2\sqrt{x})} = 
    \dfrac{-1}{2x \cdot x^{1/2}} = \mbox{\fbox{$\displaystyle \dfrac{-1}{2x^{3/2}}$}}    
$$

{}[Double check the answer. $f(x)=1/\sqrt{x} = 1/x^{1/2} = x^{-1/2}$. The power rule says that $f'(x) = -\frac{1}{2}x^{-3/2} = \dfrac{-1}{2x^{3/2}}$. ]

\vspace{0.05in}


\vspace{0.05in}

   \end{enumerate}

\newpage

   \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) = x^3-x^2+x-1$ and $x_0=-2$

\vspace{0.05in}

We need a point and a slope.

\vspace{0.05in}

When $x=-2$, $f(x)=f(-2)=(-2)^3-(-2)^2+(-2)-1=-8-4-2-1=-15$. So our tangent line passes through the point $(x,y)=(-2,-15)$.

\vspace{0.05in}

The derivative of $f(x)$ is a formula for the slope of $f$'s tangent lines. In particular, $f'(-2)$ is the slope of the tangent at $x=-2$. Using linearity and the power rule, we get $f'(x)=3x^2-2x+1$ so that $f'(-2)=3(-2)^2-2(-2)+1=17$. 

\vspace{0.05in}

Finally using point-slope we can find the equation of our tangent line: $y-(-15) = 17(x-(-2))$. Simplfying, we get: $y+13=17x+34$
and so \fbox{$y=17x+19$}.

\vspace{0.05in}

Wolfram Alpha will confirm our answer: \verb|tangent line x^3-x^2+x-1 at x=-2| \href{https://www.wolframalpha.com/input/?i=tangent+line+x%5E3-x%5E2%2Bx-1+at+x%3D-2}{\ALPHA}


\vspace{0.05in}

      \item $f(x) = \ln(x)$ and $x_0=1$

\vspace{0.05in}

Same as in part (a). $f(1)=\ln(1)=0$ so our line passes through $(x,y)=(1,0)$. 

\vspace{0.05in}

$f'(x)=\dfrac{1}{x}$ and so our slope is $f'(1)=\dfrac{1}{1}=1$. 

\vspace{0.05in}

Using point-slope we get that $y-0 = 1(x-1)$ and so \fbox{$y=x-1$}.

\vspace{0.05in}

Wolfram Alpha will confirm our answer: \verb|tangent line ln(x) at x=1| \href{https://www.wolframalpha.com/input/?i=tangent+line+ln(x)+at+x%3D1}{\ALPHA}

\vspace{0.05in}

   \end{enumerate}

   \item Compute the derivative of each of the following functions. 

   \begin{enumerate}
      \item $y = 8\sqrt[4]{x}-7\ln(x)+2e^x-\dfrac{9}{x^{5}}+3x+\sqrt{57}$  
\qquad $= 8x^{1/4}-7\ln(x)+2e^x-9x^{-5}+3x+\sqrt{57}$
% standard stuff

\vspace{0.05in}

$y' = 8\cdot \dfrac{1}{4}x^{-3/4} -7 \cdot \dfrac{1}{x} +2e^x -9(-5)x^{-6}+3+0 =$
\fbox{$2x^{-3/4}-\dfrac{7}{x}+2e^x+45x^{-6}+3$}

\vspace{0.05in}

Wolfram Alpha will give a simplified answer: \verb|derivative 8x^(1/4)-7 ln(x) +2e^x -9x^(-5)+3x+sqrt(57)| \href{https://www.wolframalpha.com/input/?i=derivative+8x%5E(1%2F4)-7+ln(x)+%2B2e%5Ex+-9x%5E(-5)%2B3x%2Bsqrt(57)}{\ALPHA}

\vspace{0.05in}


      \item $y = x^7\ln(x+1)$  \qquad Use the product rule: first part = $x^7$ and second part = $\ln(x+1)$ % product rule

\vspace{0.05in}

Technically, we also need to use the chain rule when differentiating $\ln(x+1) = \ln(\mbox{BLAH})$. It's derivative is $\dfrac{1}{\mbox{BLAH}} \cdot \mbox{BLAH}' = \dfrac{1}{x+1} \cdot 1$.

\vspace{0.05in}

$y' = (x^7)' \ln(x+1) + x^7 (\ln(x+1))' =$ \fbox{$7x^6\ln(x+1)+x^7 \cdot \dfrac{1}{x+1}$}
\vspace{0.05in}

Wolfram Alpha will give a simplified answer: \verb|derivative x^7 ln(x+1)| \href{https://www.wolframalpha.com/input/?i=derivative+x%5E7+ln(x%2B1)}{\ALPHA}

\vspace{0.05in}

      \item $\displaystyle{y = \frac{x^2e^x+5x-1}{x^3+4}}$  \qquad We need to use the quotient rule. % quotient rule

\vspace{0.05in}

While using the quotient rule we'll also have to use the product rule to differentiate $x^2e^x$ (part of the numerator).

\vspace{0.05in}

$y' = \dfrac{(x^2e^x+5x-1)'(x^3+4)-(x^2e^x+5x-1)(x^3+4)'}{(x^3+4)^2} = $
\fbox{$ \dfrac{(2xe^x+x^2e^x+5)(x^3+4)-(x^2e^x+5x-1)(3x^2)}{(x^3+4)^2}$}


\vspace{0.05in}

Wolfram Alpha will give a simplified answer: \verb|derivative (x^2e^x+5x-1)/(x^3+4)| \href{https://www.wolframalpha.com/input/?i=derivative+(x%5E2e%5Ex%2B5x-1)%2F(x%5E3%2B4)}{\ALPHA}

\vspace{0.05in}

      \item $\displaystyle y = \Big(e^{x^3}+11x-6\Big)^{45}$  \qquad We need to use the chain rule (i.e. generalized power rule). % double chain rule

\vspace{0.05in}

We'll actually need to apply a second chain rule to the term $e^{x^3}$ on the inside of the $(\mbox{BLAH})^{45}$. Recall that the derivative of $e^{\mbox{STUFF}}$ is $e^{\mbox{STUFF}} \cdot \mbox{STUFF}'$, so the derivative of $e^{x^3}$ is $e^{x^3}(3x^2)$.

\vspace{0.05in}

$y' = 45\left(e^{x^3}+11x-6\right)^{44}\left(e^{x^3}+11x-6\right)' = $ \fbox{$45\left(e^{x^3}+11x-6\right)^{44}\left(e^{x^3}(3x^2)+11\right)$}

\vspace{0.05in}

Wolfram Alpha will give a simplified answer: \verb|derivative (e^(x^3)+11x-6)^45| \href{https://www.wolframalpha.com/input/?i=derivative+(e%5E(x%5E3)%2B11x-6)%5E45}{\ALPHA}

\vspace{0.05in}

      \item $\displaystyle{y = \ln\left(\frac{11\sqrt[3]{x}\,e^{-8x}}{(x^2+1)^6(x-2)^{100}}\right)}$ \qquad We must first use laws of logs to expand. % log problem

\vspace{0.05in}

$y = \ln\left(11x^{1/3}\,e^{-8x}\right) - \ln\left((x^2+1)^6(x-2)^{100}\right) = \ln(11)+\ln(x^{1/3})+\ln(e^{-8x})-\ln((x^2+1)^6)-\ln((x-2)^{100})$

\qquad $= \ln(11)+\dfrac{1}{3}\ln(x)-8x-6\ln(x^2+1)-100\ln(x-2)$

\vspace{0.05in}

Now we can differentiate. Note that to differentiate $\ln(x^2+1)$ and $\ln(x-2)$ we'll have to use the chain rule. Which (for a natural log) looks like $(\ln(\mbox{BLAH}))' = \dfrac{1}{\mbox{BLAH}} \cdot \mbox{BLAH}'$.

\vspace{0.05in}

$y' = 0 + \dfrac{1}{3} \cdot \dfrac{1}{x} -8 -6 \dfrac{1}{x^2+1}(2x)-100\dfrac{1}{x-2}\cdot 1 = $
\fbox{$\dfrac{1}{3x}-8-\dfrac{12x}{x^2+1}-\dfrac{100}{x-2}$}

\vspace{0.05in}

Wolfram Alpha will give a simplified answer: \verb|derivative ln((11x^(1/3)e^(-8x))/((x^2+1)^6(x-2)^100))| \href{https://www.wolframalpha.com/input/?i=derivative+ln((11x%5E(1%2F3)e%5E(-8x))%2F((x%5E2%2B1)%5E6(x-2)%5E100))}{\ALPHA}

   \end{enumerate}

\end{enumerate}

\end{document}
