\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}
\newtheorem{theorem}{Theorem}
\begin{document}
\centerline{MATH 135 -- Calculus 1}
\centerline{Second Derivative and Concavity}
\centerline{November 15, 2019}
\vskip 10pt
\noindent
{\it Background}
\vskip 10pt
We say $f$ (or the graph $y = f(x)$) is \emph{concave up} on an interval if $f'$
is increasing on that interval, and similarly, $f$ or its graph is \emph{concave down}
of $f'$ is decreasing on that interval.  Combined with our results from last time, this
says:
\begin{itemize}
\item If $f''(x) > 0$ on an interval, then $f$ or its graph is concave up on that
interval
\item If $f''(x) < 0$ on an interval, then $f$ or its graph is concave down on 
that interval
\item A point $(c,f(c))$ on the graph of $f$ where the concavity changes is 
called a \emph{point of inflection} of $f$.
\end{itemize}
The notion of concavity can also be used to state a second method for determining
whether critical points are local maxima or local minima, called the Second Derivative 
Test:
\begin{theorem} (Second Derivative Test)  Let $f$ be differentiable on some open interval
containing a critical point $c$.  In addition, assume $f''(c)$ exists.
\begin{itemize}
\item[(a)]  If $f''(c) > 0$, then $f(c)$ is a local minimum 
\item[(b)]  If $f''(c) < 0$, then $f(c)$ is a local maximum 
\item[(c)]  If $f''(c) = 0$, there is no conclusion.
\end{itemize}
\end{theorem}
In the last case here, $f$ could have either a local maximum or a local minimum, or neither, 
so no conclusion is possible.  \emph{Technical Comment}:
In the other cases, the intuition is that $f'$ should be 
increasing or decreasing on an interval containing $c$ depending on the sign of $f''(c) = (f')'(c)$, 
so that (a) corresponds to a case where the graph is concave up at $c$ and (b) corresponds
to a case where the graph is concave down at $c$.
This would follow, for instance, if we knew (in addition) that $f''$ was continuous on some
interval containing $c$.  But the conclusion of the Theorem 
is valid even without that extra continuity 
hypothesis, as is shown in Exercise 67 in Section 4.4.
\vskip 10pt
\noindent
{\it Questions}
\vskip 10pt
\noindent
\begin{enumerate}
\item[1.]  Consider $f(x) = x^2 e^{-x}$.
\begin{enumerate}
\item[(a)]  Compute $f'(x)$ and find all critical points.
\item[] {\it Answer:}  $f'(x) = (-x^2 + 2x)e^{-x}$.  This exists for all real $x$.  Now $e^{-x} \ne 0$ for all real $x$, 
so the critical points come by solving $-x^2 + 2x = x(-x + 2) = 0$, so $x = 0$ and $x = 2$ are the critical points.
\item[(b)]  Determine the sign of $f'(x)$ on each interval between successive critical points, and
use that to classify the critical points as local maxima or local minima by the First Derivative Test.
\item[] {\it Answer:}  On $(-\infty,0)$ taking $x = -1$ we see $f'(-1) = -3e < 0$.  Hence $f$ is \emph{decreasing}
on $(-\infty,1)$.  On $(0,2)$, taking $x = 1$, we see $f'(1) = e^{-1} > 0$, so $f$ is \emph{increasing} on $(0,2)$.
Finally on $(2,\infty)$, $f'(3) = -3 e^{-3} < 0$, so $f$ is \emph{decreasing} on $(2,\infty)$. By the First
Derivative Test, this says that $f$ has a \emph{local minimum} at $x = 0$ and a \emph{local maximum} at $x = 2$. 
\item[(c)]  Now compute $f''(x)$ and check your answers in (b) by using the Second
Derivative Test.
\item[] {\it Answer:} $f''(x) = (x^2 - 4x + 2)e^{-x}$.  At the first critical point $x = 0$, we have
$f''(0) = 2 > 0$ so we see (in a different way) that $f$ has a local minimum there.
At the second critical point $x = 2$, $f''(2) = -4 e^{-2} < 0$.  Hence $f$ has a local maximum there.
This also agrees with what we saw above in part (b). 
\item[(d)]  Determine all points of inflection of $f$.
\item[] {\it Answer:}  The points of inflection are the $x$ where $f''(x)$ changes sign.  This 
happens here when $f''(x) = 0$, or at the roots of $x^2 - 4x + 2 = 0$.  By the quadratic formula,
$$x = \frac{4 \pm \sqrt{8}}{2} = 2\pm\sqrt{2}.$$
\end{enumerate} 
\item[2.]  Consider the graph $f(x) = x^3 - 3x^2 + 2x$ on the interval $[-1,3]$ 
(the plot is on the back of this sheet).  
Find the intervals where $f$ is concave up and the intervals where $f$ is 
concave down.  How many points of inflection are there on this graph and where
are they located?
\item[] {\it Answer:}  $f'(x) = 3x^2 - 6x + 2$, so $f''(x) = 6x - 6$.  This is $=0$ and
changes sign at $x = 1$ ($f''(x) < 0$ for $x < 1$ and $f''(x) > 0$ for $x > 1$).  So 
$y = f(x)$:
\begin{itemize}
\item is concave down on $(-\infty,1),$
\item is concave up on $(1,\infty)$, and
\item $(1,0)$ is the only point of inflection. 
\end{itemize}
\item[3.]  Repeat question 2 for  $f(x) =  2x^4 - 3x^2 + 2$. 
\item[] {\it Answer:} $f'(x) = 8x^3 - 6x$ and $f''(x) = 24x^2 - 6$.  This changes sign at 
$x = \pm\sqrt{1/4} = \pm \frac{1}{2}$.  $y = f(x)$: 
\begin{itemize}
\item is concave up on $\left(-\infty,-\frac{1}{2}\right)$ and $\left(\frac{1}{2},\infty\right)$.
\item is concave down on $\left(-\frac{1}{2},\frac{1}{2}\right)$,
\item and has inflection points at $x = \pm \frac{1}{2}$.  
\end{itemize}
\end{enumerate}
\begin{figure}
\begin{center}
\includegraphics[width=.6\linewidth]{cubicconv.png}
\caption{Plot for question 2}
\end{center}
\end{figure}
\end{document}
