\documentclass[11pt]{article}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\usepackage{latexsym,amsmath,amssymb,float,graphicx,subfig}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{8.6in}
\setlength{\topmargin}{-0.6in}
\begin{document}
\centerline{MATH 135 -- Calculus 1}
\centerline{Curve Sketching}
\centerline{November 20, 2019}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
When mathematicians and scientists want to understand graphs of 
functions and other curves these days, they almost always turn to graphing 
calculators and mathematical software to generate the plots. So learning to 
plot functions by hand can seem somewhat pointless. However, in my experience, 
some experience with curve sketching by hand is a great way to solidify your
understanding of the First and Second Derivative Tests, concavity, asymptotes, 
etc. So while you might never need to do this again in ``real life,'' 
it's still a worthwhile educational exercise.

Here's a checklist of things to do and look for, given $y = f(x)$ to plot:
\begin{enumerate}
\item Determine the domain of your function and note whether the graph has any vertical asymptotes. Draw those in if there are any.
\item Compute $f'(x)$ and find the critical points $x = c$, and the critical values $f(c)$.
\item On each interval between adjacent critical points, determine the 
sign of $f'(x)$. Recall that intervals where $f'(x) > 0$ are intervals where $f$ 
is increasing and intervals where $f'(x) < 0$ are intervals where $f$ is decreasing.
\item Compute $f''(x)$ and determine any $x$ where $f''(x) = 0$ or 
where $f''(x)$ does not exist.
\item Determine the intervals where $f$ is concave up and concave 
down using the sign of $f''$ (recall that inflection points are places 
where the concavity changes. If your function has inflection
points, find them and the function values there.
\item Determine horizontal asymptotes (if any), by taking $\lim_{x\to\pm\infty}f(x)$.
(L'Hopital's Rule will be useful for some of these. One or other of these directions might not make sense for some functions if the 
domain does not extend to $\pm\infty$.)
\item The critical points and the inflection points can be thought of as 
\emph{transition points} as described
in Section 4.6 of the text.
\item You should now be prepared to sketch the graph using the 
transition points, the information about where the function is increasing, 
decreasing, concave up, and concave down. See Figures
1 and 2 on page 231 for the four basic local shapes of graphs 
and an example of how they can
be put together.
\end{enumerate}
\vskip 10pt
\noindent
{\it Questions}
\vskip 10pt
Find the transition points (critical points and points of inflection), intervals of increase and decrease,
intervals of upward and downward concavity, asymptotes, and sketch the graph:
\begin{enumerate}
\item  $y = x^5 - 15 x^3$ (Hint: This one has three critical points, three points of 
inflection, and no asymptotes.)
\item[] {\it Answers:}  $y' = 5x^4 - 45 x^2 = 5x^2(x^2 - 9)$.  This exists for all $x$; it is zero at $x = -3, 0, 3$.
$y$ is increasing for $x < -3$, decreasing for $-3 < x < 3$, increasing for $x > 3$.  By the first derivative test, 
$y$ has a local maximum at $(x,y) = (-3,162)$; the critical point at $x = 0$ is neither a local maximum nor local minimum, 
and $y$ has a local minimum at $(x,y) = (3, -162)$.  $y'' = 20x^3 - 90 x = 10x(2x^2 - 9)$.  This is zero at $x = -3/\sqrt{2},0,3/\sqrt{2}$
The sign of $y''$ changes at each, so these are all points of inflection.  The graph is concave down on $(-\infty,-3/\sqrt{2})$
and $(0,3/\sqrt{2})$ and concave up on $(-3/\sqrt{2},0)$ and $(3/\sqrt{2},\infty)$.  
The graph is given in Figure 1.
\begin{figure}
\begin{center}
\includegraphics[width=.3\linewidth]{CurveSketching1.png}
\caption{The graph $y = x^5 - 15x^3$ for $-4 \le x \le 4$}
\end{center}
\end{figure}
\item $y = x - 2 \ln(x)$ (Hint: $\lim_{x\to 0+} \ln(x) = -\infty$.)
\item[] {\it Answers:} The domain of this function is just the set of all $x > 0$.  The graph has a vertical asymptote
at $x = 0$ from the right, with $\lim_{x\to 0^+} y = +\infty$. The first derivative is  $y' = 1 - \frac{2}{x} = 0$ when $x = 2$.
Note: We \emph{do not} say that $x = 0$ is a critical point here since that $x$ is not in the domain of $y$ either. 
$y$ is decreasing on $(0,2)$ and increasing on $(2,\infty)$.   So $y$ has a local minimum at $(2,2-\ln(2))$.  
The second derivative is $y'' = \frac{2}{x^2}$.  This is $> 0$ for all $x > 0$, so the graph is always concave up.  It
is given in Figure 2.  
\begin{figure}
\begin{center}
\includegraphics[width=.3\linewidth]{CurveSketching2.png}
\caption{The graph $y = x - 2\ln(x)$ for $0 < x \le 5$}
\end{center}
\end{figure}  
\item $y = \displaystyle \frac{1}{x^2 - 2x}$
(Hint: This one has both horizontal and vertical asymptotes. Be sure to simplify
$f'(x)$ before computing the second derivative.)
\item {\it Answers}:  There are vertical asymptotes at the roots of the polynomial in the denominator:  $x = 0$ and $x = 2$.
$\lim_{x\to\pm\infty} \frac{1}{x^2 - 2x} = 0$, so there is a horizontal asymptote at $y = 0$ (in both directions).  
We have $y' = \frac{-(2x - 2)}{(x^2 - 2x)^2}$.  This is zero at $x = 1$.  $y' > 0$ for all $x < 1$ except $x = 0$, and $y' < 0$
for all $x > 1$ except $x = 2$.  Hence $(1,-1)$ is a local maximum.  Next, 
\[
y'' = \frac{(x^2 - 2x)^2(-2) + 2(2x - 2)(x^2 - 2x)(2x - 2)}{(x^2-2x)^4} = \frac{6x^2 - 12x + 8}{(x^2 - 2x)^3}.
\]
The top here is always $> 0$, but the bottom is $>0$ for $x < 0$ and $x > 2$, while the bottom is $<0$ for $0 < x < 2$.
This says that the graph is concave up for $x < 0$ and $x > 2$, but concave down for $0 < x < 2$.  Note:  We would 
\emph{not} call $x = 0,2$ points of inflection here because $y$ is not continuous at those points because of the 
vertical asymptotes.  The graph is given in Figure 3.
\begin{figure}
\begin{center}
\includegraphics[width=.3\linewidth]{CurveSketching3.png}
\caption{The graph $y = \frac{1}{x^2 - 2x}$ for $-1 \le x \le 3$}
\end{center}
\end{figure}
\item $y = x^2 e^{-2x}$ (Hint: This has a horizontal asymptote in one direction but
not the other.) 
\item[] {\it Answers:}  $y' = (-2x^2 + 2x)e^{-2x}$ so there are critical points at $x = 0$ and $x = 1$.  $y' < 0$ for $x < 0$ and $x > 1$
while $y' > 0$ for $0 < x < 1$.  By the First Derivative Test, $y$ has a local minimum at $(0,0)$ and a local maximum at $(1,e^{-2})$.
Then $y'' = (4x^2 - 8x + 2)$ this is $=0$ at $x = \frac{8\pm\sqrt{64-32}}{8} = 1\pm\frac{\sqrt{2}}{2} \doteq .293, 1.707$.  
These are points of inflection
because $y'' > 0$ (the graph is concave up) for $x < 1 - \frac{\sqrt{2}}{2}$ and $x > 1 + \frac{\sqrt{2}}{2}$ while $y'' < 0$ (the graph 
is concave down) for $1 - \frac{\sqrt{2}}{2} < x < 1 + \frac{\sqrt{2}}{2}$.  
Finally, by L'Hopital's Rule, 
\[
\lim_{x\to\infty} \frac{x^2}{e^{2x}} = \lim_{x\to\infty} \frac{2x}{2e^{2x}} = \lim_{x\to\infty} \frac{2}{4e^{2x}} = 0,
\]
so the graph has a horizontal asymptote at $y = 0$ (in the positive $x$-direction only).  
 The graph is given in Figure 4.
\begin{figure}
\begin{center}
\includegraphics[width=.3\linewidth]{CurveSketching4.png}
\caption{The graph $y = x^2 e^{-2x}$ for $-1/2 \le x \le 3$}
\end{center}
\end{figure}
\end{enumerate}
\end{document}
