\documentclass[12pt]{amsart}

\usepackage{amsmath, amssymb, amsthm}
\usepackage[margin=0.5in]{geometry}
\usepackage[pdflang={en-US}]{hyperref}
\usepackage[shortlabels]{enumitem}

\usepackage{tikz}

\renewcommand{\thesection}{\Alph{section}}

\newcommand{\scs}[1]{\begin{scshape}#1\end{scshape}}
\newcommand*{\inv}{^{-1}}
\newcommand*{\RR}{\mathbb{R}}
\newcommand*{\QQ}{\mathbb{Q}}
\newcommand*{\ZZ}{\mathbb{Z}}
\newcommand*{\NN}{\mathbb{N}}

\newcommand*{\inte}[2][x]{\int #2\, d#1}
\newcommand*{\der}[2][x]{\frac{d}{d#1}\!\left[ #2 \right]}

\newtheorem*{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem*{definition}{Definition}
\newtheorem{problem}{}
\newtheorem*{challenge}{Challenge}
\newtheorem*{example}{Example}
\newtheorem*{solution}{Solution}
\newtheorem*{ruleofthumb}{Rule of Thumb}

\newcommand{\thm}[1]{\begin{theorem}#1\end{theorem}}
\newcommand{\prob}[1]{\begin{problem}#1\end{problem}}
\newcommand{\dfn}[1]{\begin{definition}#1\end{definition}}
\newcommand{\chal}[1]{\begin{challenge}#1\end{challenge}}
\newcommand{\eg}[1]{\begin{example}#1\end{example}}
\newcommand{\sol}[1]{\begin{solution}#1\end{solution}}
\newcommand{\rot}[1]{\begin{ruleofthumb}#1\end{ruleofthumb}}

\newcommand{\abs}[1]{\left| #1 \right|}

\title{Slopes and rates of change}
\date{September 12, 2022}

\begin{document}
\ \vspace{-.3in}

\maketitle

\vspace{-.2in}

\dfn{[see p.\@ 129 of the textbook]
  The \textbf{average rate of change} of $f(x)$ as $x$ changes from $x_1$ to $x_2$ (when $x_1 \neq x_2$) is \[
 \boxed{ \frac{f(x_2) - f(x_1)}{x_2-x_1}}
 \]
 This is the same as the \textbf{slope of the secant line} thorugh the points $(x_1, f(x_1))$ and $(x_2, f(x_2))$.
}

\prob{\label{secants}
  Shown below is a graph of the function $f(x) = 4x-x^2$.
  We wil consider the average rate of change from $x_1 =0$ to $x_2 = h$.
  
  \includegraphics[width=.6\textwidth]{ws-02-graph1.png}
  
  \begin{enumerate}[a)]
  \item Sketch the secant line from $(0,f(0))$ to $(4, f(4))$ and calculate its slope.
    
    \vfill
    
  \item Sketch the secant line from $(0,f(0))$ to $(3, f(3))$ and calculate its slope.
    
    \vfill
    
  \item Sketch the secant line from $(0,f(0))$ to $(2, f(2))$ and calculate its slope.
    
    \vfill
    
  \item Sketch the secant line from $(0,f(0))$ to $(1, f(1))$ and calculate its slope.
    
    \vfill
    
  \end{enumerate}
}

\newpage

\dfn{[see p.\@ 139 of the textbook]
  The \textbf{instantaneous rate of change} (also called the \textbf{derivative}) of $f(x)$ at $x=a$ is
  \[
 \boxed{\lim_{h \to 0} \frac{f(a+h) - f(a)}{h}}
 \]
 This is the same as the \textbf{slope of the tangent line} at the point $(a, f(a))$.
}

\prob{
  Continue working with the function $f(x) = 4x-x^2$.
  Our goal now is to find the instantaneous rate of change of $f(x)$ at $x = 0$.
  \begin{enumerate}[a)]
  \item Does your work for problem \ref{secants} suggest an answer? Make a guess if you can.

    \vspace{.25in}

  \item Calculate the limit $\displaystyle \lim_{h \to 0} \frac{f(0+h) - f(0)}{h}$.
    
    \vfill
    
  \item Find an equation for the tangent line (use the point $(0,0)$ and the slope you just calculated). Add this line to the graph on page 1.
    
    \vspace{.4in}
    
  \end{enumerate}
}

\dfn{
  The \textbf{difference quotient} of $f(x)$ is \[
  \boxed{\frac{f(x+h) - f(x)}{h}}
  \]
  Note that the derivative of $f$ at $x$ is the limit of the difference quotient as $h \to 0$.
}

\prob{
  Calculate the difference quotient for the following functions and reduce the fraction.
  \begin{enumerate}[a)]
    \item $f(x) = 4x$
    
    \vspace{.4in}
    
    \item $f(x) = x^2$
    
    \vfill
    
    \item $f(x) = 4x-x^2$
    
    \vfill
    
  \end{enumerate}
  }
\end{document}
