%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                       %
%  Curve Sketching II                                   %
%                                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\problemgrouptitle{Curve Sketching II}

\begin{problemblock}{Apply calculus techniques to identify all important features of the graph of each function and then sketch it.}

\item $f(x)=x^3-3x-2$
\answer{Notice $f'(x)=3x^2-3=3(x+1)(x-1)$ and $f''(x)=6x$.
$D=\mathset{R}=(-\infty,\infty)$;
$x$-int$=-1,\ 2$; $y$-int$=-2$;
No asymptotes;
No symmetry; 
Increasing on: $(-\infty,-1)\cup(1,\infty)$; Decreasing on: $(-1,1)$;
\Relative maxima: $f(-1)=0$; \Relative minimum: $f(1)=-4$;
Concave upward on: $(0,\infty)$; Concave downward on $(-\infty,0)$;
Inflection point: $(0,-2)$; Graph:
\begin{center}
\resizebox{4cm}{!}{\asycode{%
import graph;
size(250,250);
real f(real x) {return x^3-3*x-2;}
pair F(real x) {return (x,f(x));}
draw(graph(f,-2,2.15,operator ..),red+2);
xaxis("$x$",Arrow(HookHead,size=4),above=true);
yaxis("$y$",Arrow(HookHead,size=4),above=true);
dot(F(-1),4+black);
label("$(-1,0)$",F(-1),N);
dot(F(1),4+black);
label("$(1,-4)$",F(1),S);
xtick("$2$",2);
label("$f(x)=x^3-3x-2$",F(2.15),NNW);
}}
\end{center}
}

\lab{\addtoanswerkey{\clearpage}}
\item $\displaystyle y=\frac{3x^2}{x^2-1}$ 
\answer{Notice that the first and second derivatives simplify to $\displaystyle y'(x)=-\frac{6x}{(x^2-1)^2}$ and $\displaystyle y''=\frac{6(3x^2+1)}{(x^2-1)^3}$.
$D=\mathset{R}-\{-1,1\}=(-\infty,-1)\cup(-1,1)\cup(1,\infty)$;
$x$-int$=0$; $y$-int$=0$;
Horizontal asymptote: $y=3$; Vertical asymptotes: $x=-1$, $x=1$;
Symmetric about the $y$-axis;  
Increasing on: $(-\infty,-1)\cup(-1,0)$; Decreasing on: $(0,1)\cup(1,\infty)$;
\Relative maxima: $f(0)=0$; No~\relative minimum;
Concave upward on: $(-\infty,-1)\cup(1,\infty)$; Concave downward on $(-1,1)$;
No~inflection points; Graph:
\begin{center}
\resizebox{5cm}{!}{\asycode{%
import graph;
size(200,200);
real f(real x) {return 3*x^2/(x^2-1);}
pair F(real x) {return (x,f(x));}
draw(graph(f,-5,-1.3,operator ..),red+2);
draw(graph(f,-.7,.7,operator ..),red+2);
draw(graph(f,1.3,5,operator ..),red+2);
xaxis("$x$",Arrow(HookHead,size=4),above=true);
yaxis("$y$",Arrow(HookHead,size=4),above=true);
dot(F(0),4+black);
label("$(0,0)$",F(0),N);
xequals(-1,ymin=f(.7),ymax=f(1.3),dashed);
xequals(1,ymin=f(.7),ymax=f(1.3),dashed);
yequals(3,xmin=-5,xmax=5,dashed);
label("$f(x)=\frac{3x^2}{x^2-1}$",F(2),NE);
label("$x=-1$",F(-.7),SW);
label("$x=1$",F(.7),SE);
label("$y=3$",(-5,3),SE);
}}
\end{center}
}

\item $f(x)=\displaystyle\frac{x^2}{x^2+2x+1}$
\answer{ Notice that the derivatives simplify to $f'(x)=\displaystyle\frac{2x}{\left(x+1\right)^3}$ and $f''(x)=\displaystyle\frac{2-4x}{\left(x+1\right)^4}$.
$D=\mathset{R}-\{-1\}=(-\infty,-1)\cup(-1,\infty)$;
$x$-int$=0$; $y$-int$=0$;
Horizontal asymptote: $y=1$; Vertical asymptote: $x=-1$;
No symmetry;  
Increasing on: $(-\infty,-1)\cup(0,\infty)$; Decreasing on: $(-1,0)$;
No~\relative maxima; \Relative minimum: $f(0)=0$;
Concave upward on: $(-\infty,-1)\cup(-1,1/2)$; Concave downward on $(1/2,\infty)$;
Inflection point: $(1/2,1/9)$; Graph:
\begin{center}
\resizebox{6cm}{!}{\asycode{%
import graph;
size(200,200);
real f(real x) {return x^2/(x^2+2*x+1);}
pair F(real x) {return (x,f(x));}
draw(graph(f,-5,-1.69,operator ..),red+2);
draw(graph(f,-0.71,5,operator ..),red+2);
xaxis("$x$",Arrow(HookHead,size=4),above=true);
yaxis("$y$",Arrow(HookHead,size=4),above=true);
dot(F(0),4+black);
dot(F(0.5),4+black);
label("$(1/2,1/9)$",F(0),SE);
xequals(-1,ymin=-.3,ymax=f(-1.69),dashed);
yequals(1,xmin=-5,xmax=5,dashed);
label("$f(x)=\frac{x^2}{x^2+2x+1}$",(2.5,1.5),N);
label("$x=-1$",(-1,-.3),SSW);
label("$y=1$",(-5,1),SE);
}}
\end{center}
}

\end{problemblock}
