\documentclass{amsart}[11pt]
\usepackage{graphicx}

\addtolength{\textwidth}{1.4in}                          
\oddsidemargin=0in                          
\evensidemargin=0in       

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}
\newtheorem{fact}[example]{Fact}

\begin{document}

\title{Math 241, Lecture 22}
\maketitle

\section{ The second derivative and concavity}  

Studying the derivative has been great fun,   and a good way to
better understand functions.    We can now find where a function
is increasing or decreasing and where it might have a maximum or minimum.  

If once was so good, why not take the derivative a second time?    
The derivative of the derivative of $f(x)$ is known as the second derivative,
and is denoted by $f''(x)$ (among other things).  
As you would expect, the second derivative gives us more information
about a function's behavior.  

\begin{definition}
A function is concave upward on the interval between $a$ and $b$ if
$f''(x) > 0$ for all $x$ between $a$ and $b$.     A function is concave downward 
on the interval between $a$ and $b$ if $f''(x) < 0$ for all $x$ between $a$ and $b$.  
\end{definition}

We can understand the terminology when we think of the meaning of the second derivative,  
as the rate of change of the first derivative.     A positive second derivative means that 
if the first derivative were positive it is becoming more positive,   and if it were negative
it would become less negative.    In either case, the graph of the function ``curls up'', which
is what it means to be concave upward.     The analysis of a negative second
derivative is similar.  


\begin{example}
Find where the function $x^4 - 4x^3 - 18 x^2  + 57x - \sqrt{7}$ is concave upward or downward.  
\end{example}

Concavity information will be useful in graphing curves.  


\section{ The second derivative and extrema}  

One immediate application of the second derivative is to give a sometimes easier way to 
determine whether a critical point of a function is a relative maximum or minimum.   
Brief analysis of the graphs shows that at a relative maximum a 
function must be concave downwards,   and at a relative minimum it must be
concave downwards.  

\begin{theorem}
Let $P = (c, f(c))$ be a stationary point of a function $f(x)$.  
\begin{itemize}
\item $P$ is a relative maximum if $f''(c) < 0$.  
\item $P$ is a relative minimum if $f''(c) > 0$.   
\end{itemize}
\end{theorem}

\begin{example}
A gag store can buy whoopie cushions at \$1.25 each and
estimates that if they are sold for $x$ dollars each,  they can sell
$10 e^{-0.02 x}$ each week.  Express the profit as a function of $x$
and find the price at which profit is maximized.  
\end{example}

\section{ Curve sketching}  

We can assemble which comes through our analysis of 
a function and its first and second derivatives in order to 
get a good picture of the graph of a function.  
%The steps we take are as follows:

\begin{itemize}
\item Plot a few values of the function, including $f(0)$, which is where the
function crosses the $y$-axis.  
\item Determine $\lim_{x \to \infty} f(x)$ and $\lim_{x \to -\infty} f(x)$, 
if they exist, in order to see where the graph ``begins'' and ``ends'' and draw in 
these ends if they can be determined. 
\item Find and plot the places where the function crosses the $x$-axis
by solving the equation $f(x) = 0$.  
\item Calculate the first derivative and find where it is zero, positive positive and negative 
in order to find the critical points of $f$ and determine where $f$ is increasing
and decreasing.  
\item Calculate the second derivative and find where it is zero, positive and
negative in order to determine where $f$ is concave upward and downward.  
\item Check where the sign of the derivative changes or use the second derivative
test to determine which critical points are
local maxima or minima.  
\item Draw in ``cups'' at local minima, ``caps'' at local maxima, and one of four kinds
of curve, as sketched on the board, in the regions where the the signs of the first
and second derivative do not change.  
\item Fill in the parts of the graph in between the curves you have put in.  
\end{itemize}

\begin{example}
Sketch the graph of $f(x) = 2x^3 + 3x^2 - 12x - 7$,   and of $x e^{1-x}$.  
\end{example}


\end{document}
 