\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amstext}
\usepackage{amssymb}


\newcommand{\ra}{\rightarrow}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\HH}{\mathbb{H}}

\newtheorem{problem}{Problem}
\newtheorem{definition}{Definition}
\newtheorem{lemma}[definition]{Lemma}
\newtheorem{property}[definition]{Property}
\newtheorem{theorem}[definition]{Theorem}
\newtheorem{corollary}[definition]{Corollary}
\newtheorem{remark}[definition]{Remark}
\newtheorem{proposition}[definition]{Proposition}


\begin{document}
{\Large Extra Credit -- Solution}
\vspace{.2in}

\[
y=\frac{32(x+6)}{(x+2)^2}
\]

\begin{enumerate}

%**************************************************************************

\item  {\bf Asymptotes:} 
Horizontal: $y=0$.
Vertical: $x=-2$.

To find the horizontal asymptotes, if any, we take the limit:
\begin{eqnarray*}
\lim_{x\ra \infty} \frac{32(x+6)}{(x+2)^2} 
	& = & \lim_{x\ra \infty} \frac{32x+192}{x^2+4x+4} \\
	& = & \lim_{x\ra \infty} \frac{\frac{32x}{x^2}+\frac{192}{x^2}}
		{\frac{x^2}{x^2}+\frac{4x}{x^2}+\frac{4}{x^2}} \\
	& = & \lim_{x\ra \infty} \frac{\frac{32}{x}+\frac{192}{x^2}}
		{1+\frac{4}{x}+\frac{4}{x^2}} \\
	& = & \frac{0+0}{1+0+0} \\
	& = & 0 \\
\end{eqnarray*}

So, our horizontal asymptotes is $y=0$.

To find a vertical asymptote, we look where the denominator of the 
function is 0, so look at $x=-2$.
To really check that $x=-2$ is a vertical asymptote, 
we need to check the limit:
\[
\lim_{x\ra -2} \frac{32(x+6)}{(x+2)^2} 
\]
We can do this by making a table, or by noticing that plugging in a $-2$
does not make the numerator 0.

So $x=-2$ is a vertical asymptote.

%**************************************************************************

\item  {\bf ${\mathbf y'}$:}
$y' = \frac{-32(x+10)}{(x+2)^3}$

Use the quotient rule.
\begin{eqnarray*}
y' 	& = & \frac{(32)(x+2)^2-32(x+6)2(x+2)}{(x+2)^4} \\
	& = & \frac{32(x+2)((x+2)-2(x+6))}{(x+2)^4} \\
	& = & \frac{32(-x-10)}{(x+2)^3} \\
	& = & \frac{-32(x+10)}{(x+2)^3} \\
\end{eqnarray*}

%**************************************************************************

\item  {\bf Critical points:} $x=-10$ and $x=-2$.

Remember that critical points are where $y'=0$ and where $y'$ does not exist.
So, $y'=0$ when the top of $y'$ is 0, or when $x=-10$.
$y'$ does not exist when the bottom of $y'$ is 0, or when $x=-2$.
We already know that $x=-2$ is a vertical asymptote, 
but we'll need to use it as a critical point.

%**************************************************************************

\item  {\bf Local max and mins (first derivative test):} \label{test1}
No local maximums, local minimum at $(-10,-2)$.

Lets test the first derivative around these critical points.
Test points: $y'(-12)=\frac{64}{-1000} < 0$,
$y'(-5)=\frac{-160}{-27} > 0$,
$y'(0)=\frac{-320}{8} < 0$.

\setlength{\unitlength}{1pt}
\begin{picture}(300,90)(-10,-15)

\put(20,0){\vector(1,0){220}}
\put(242,-2){$x$}

\put(110,-2){\line(0,1){4}}
\put(102,-13){-10}
\multiput(110,10)(0,10){7}{\line(0,1){1}}

\put(180,-2){\line(0,1){4}}
\put(173,-13){-2}
\multiput(180,10)(0,10){7}{\line(0,1){1}}

\put(0,20){$y'$}
\put(0,50){$y$}

\put(70,20){$-$}
\thicklines
\put(65,60){\vector(1,-1){20}}
\thinlines

\put(140,20){$+$}
\thicklines
\put(135,40){\vector(1,1){20}}
\thinlines

\put(210,20){$-$}
\thicklines
\put(205,60){\vector(1,-1){20}}
\thinlines

\end{picture}

So we see that there is a local minimum at $x=-10$.
This has a $y$-value of $y(-10)=-2$.
It also looks like there is a local maximum at $x=-2$, 
but remember that this is an asymptote.

%**************************************************************************

\item  {\bf ${\mathbf y''}$:}
$y'' = \frac{64(x+14)}{(x+2)^4}$

Use the quotient rule.
\begin{eqnarray*}
y'' 	& = & \frac{(-32)(x+2)^3-(-32(x+10))3(x+2)^2}{(x+2)^6} \\
	& = & \frac{-32(x+2)^2((x+2)-3(x+10))}{(x+2)^6} \\
	& = & \frac{-32(-2x-28)}{(x+2)^4} \\
	& = & \frac{64(x+14)}{(x+2)^4} \\
\end{eqnarray*}

%**************************************************************************

\item  {\bf Possible inflection points:} $x=-14, x=-2$.

%**************************************************************************

\item  {\bf Inflection points and test concavity:} \label{test2}
Inflection point at $(-14, -\frac{16}{9})$.

Lets test the first derivative around these critical points.
Test points: $y''(-16)=\frac{-128}{38416} < 0$,
$y''(-5)=\frac{576}{81} > 0$,
$y''(0)=\frac{896}{16} > 0$.

\setlength{\unitlength}{1pt}
\begin{picture}(300,90)(-10,-15)

\put(20,0){\vector(1,0){220}}
\put(242,-2){$x$}

\put(70,-2){\line(0,1){4}}
\put(62,-13){-14}
\multiput(70,10)(0,10){7}{\line(0,1){1}}

\put(110,-2){\line(0,1){4}}
\put(102,-13){-10}

\put(180,-2){\line(0,1){4}}
\put(173,-13){-2}
\multiput(180,10)(0,10){7}{\line(0,1){1}}

\put(0,20){$y''$}
\put(0,50){$y$}

\put(45,20){$-$}
\thicklines
\put(45,50){\oval(20,20)[t]}
\thinlines

\put(120,20){$+$}
\thicklines
\put(120,55){\oval(20,20)[b]}
\thinlines

\put(210,20){$+$}
\thicklines
\put(210,55){\oval(20,20)[b]}
\thinlines

\end{picture}

So we see that there is an inflection point at $x=-14$.
This has a $y$-value of $y(-14)=-\frac{16}{9}$.

%****************************************************************************

\item  {\bf Graph:}

Put together both the information from \ref{test1} and \ref{test2}.

\setlength{\unitlength}{1pt}
\begin{picture}(300,120)(-10,-15)

\put(20,0){\vector(1,0){220}}
\put(242,-2){$x$}

\put(70,-2){\line(0,1){4}}
\put(62,-13){-14}
\multiput(70,10)(0,10){9}{\line(0,1){1}}

\put(110,-2){\line(0,1){4}}
\put(102,-13){-10}
\multiput(110,10)(0,10){9}{\line(0,1){1}}

\put(180,-2){\line(0,1){4}}
\put(173,-13){-2}
\multiput(180,10)(0,10){9}{\line(0,1){1}}

\put(0,20){$y'$}
\put(0,50){$y''$}
\put(0,80){$y$}

%  x \in (-\infty,-14)
\put(45,20){$-$}
\put(45,50){$-$}
\thicklines
\put(40,75){\oval(30,30)[tr]}
\thinlines

% x \in (-14,-10)
\put(90,20){$-$}
\put(90,50){$+$}
\thicklines
\put(95,90){\oval(30,30)[bl]}
\thinlines

% x \in (-10,-2)
\put(150,20){$+$}
\put(150,50){$+$}
\thicklines
\put(145,90){\oval(30,30)[br]}
\thinlines

% x \in (-2,\infty)
\put(210,20){$-$}
\put(210,50){$+$}
\thicklines
\put(215,90){\oval(30,30)[bl]}
\thinlines

\end{picture}

Lets get some $y$ values too:

\[
\begin{array}{|r|r|r|r|r|r|r|}
\hline
x & -14           & -10 & -6 & 0  & 2  & 6 \\
\hline
y & -\frac{16}{9} &  -2 & 0  & 48 & 16 & 6 \\
\hline
\end{array}
\]

Now, put all this information together to get a good picture.
Don't forget the asymptotes.


\setlength{\unitlength}{1pt}
\begin{picture}(350,380)(0,0)

\put(0,100){\vector(1,0){350}} % x-axis
\put(234,0){\vector(0,1){350}} % y-axis

\put(52,97){\line(0,1){6}}
\put(42,111){-14}

\put(104,97){\line(0,1){6}}
\put(97,111){-10}

\put(156,97){\line(0,1){6}}
\put(150,111){-6}

\put(208,97){\line(0,1){6}}
\put(196,87){-2}

\put(260,97){\line(0,1){6}}
\put(254,83){2}

\put(312,97){\line(0,1){6}}
\put(306,83){6}

\put(231,50){\line(1,0){6}}
\put(242,47){-2}

\put(231,180){\line(1,0){6}}
\put(242,177){20}

\put(231,260){\line(1,0){6}}
\put(242,257){40}

\put(231,330){\line(1,0){6}}
\put(242,327){60}


\multiput(208,0)(0,10){34}{\line(0,1){1}}

\end{picture}



%**************************************************************************

\end{enumerate}

\end{document}





