\section{The Derivative}

\begin{definition}
	Let $I \subseteq \R$ be an interval, let $f:I \rightarrow \R$, and let $ c \in I$. We say that a real number $L$ is the \textbf{derivative of $f$ at $c$}  if given any $\varepsilon > 0$ there exists $\delta (\varepsilon) > 0$ such that if $x \in I$ satisfies $0 < |x-c|<\delta (\varepsilon)$, then
	\[\abs{\frac{f(x)-f(c)}{x-c}-L}<\varepsilon.\]
	In this case we say that $f$ is \textbf{differentiable} at $c$, and we write $f'(c)$ for $L$. In other words, the derivative of $f$ at $c$ is given by the limit
	\[f'(c) = \lim\limits_{x\to c} \frac{f(x)-f(c)}{x-c}\]
	provided this limit exists. (We allow the possibility that $c$ may be the endpoint of the interval.)
\end{definition}

\begin{theorem}
	If $f:I \rightarrow \R$ has a derivative at $c \in I$, then $f$ is continuous at $c$.
\end{theorem}

\begin{theorem}
	Let $I \subseteq \R$ be an interval, let $c \in I$ , and let $f:I \rightarrow \R$ and $g:I \rightarrow \R$ be functions that are differentiable at $c$. Then:
	\begin{enumerate}
		\item If $\alpha \in \R$, then the function $\alpha f$ is differentiable at $c$, and \[(\alpha f)'(c) = \alpha f'(c)\]

		\item The function $f+g$ is differentiable at $c$, and
		      \[(f+g)'(c) = f'(c)+g'(c)\]

		\item (Product Rule) The function $fg$ is differentiable at $c$, and
		      \[(fg)'(c) = f'(c)g(c) + f(c)g'(c).\]

		\item (Quotient Rule) If $g(c) \neq 0$, then the function $f/g$ is differentiable at $c$, and
		      \[\left( \frac{f}{g}\right)'(c) = \frac{f'(c)g(c)-f(c)g'(c)}{(g(c))^2}\]
	\end{enumerate}
\end{theorem}

\begin{corollary}
	If $f_1, f_2, \dots, f_n$ are functions on an interval $I$ to $\R$ that are differentiable at $c \in I$, then:
	\begin{enumerate}
		\item The function $f_1 + f_2 + \dots + f_n$ is differentiable at $c$ and
		      \[(f_1 + f_2 + \dots + f_n)'(c) = f_1'(c) + f_2'(c) + \dots + f_n'(c)\]

		\item The function $f_1f_2 \dots f_n$ is differentiable at $c$ and
		      \[(f_1f_2 \dots f_n)'(c) = f_1'(c)f_2(c) \dots f_n(c)+f_1(c)f_2'(c) \dots f_n(c) + \dots + f_1(c)f_2(c) \dots f_n'(c).\]
		      An important special case of the extended product rule occurs if the functions are equal, that is, $f_1 = f_2 = \dots = f_n = f$. Then the above becomes
		      \[(f^n)'(c) = n(f(c))^{n-1}f'(c)\]
	\end{enumerate}
\end{corollary}

\begin{theorem}[\textbf{Carathéodory's Theorem}]
	Let $f$ be defined on an interval $I$ containing the point $c$. Then $f$ is differentiable at $c$ if and only if there exists a function $\varphi$ on $I$ that is continuous at $c$ and satisfies
	\[f(x)-f(c)=\varphi (x)(x-c)\ \ \ \ \text{for}\ \ \ \ x \in I\]
	In this case, we have $\varphi (c)=f'(c)$.
\end{theorem}

\begin{theorem}[\textbf{Chain Rule}]
	Let $I, J$ be intervals in $\R$, let $g:I \rightarrow \R$ and $f:J \rightarrow \R$ be functions such that $f(J) \subseteq I$, and let $c \in J$. If $f$ is differentiable at $c$ and if $g$ is differentiable at $f(c)$, then the composite function $g \circ f$ is differentiable at $c$ and
	\[(g \circ f)'(c) = g'(f(c)) \cdot f'(c).\]
\end{theorem}

\begin{theorem}
	Let $I$ be an interval in $\R$ and let $f:I \rightarrow \R$ be strictly monotone and continuous on $I$. Let $J:=f(I)$ and let $g:J \rightarrow \R$ be the strictly monotone and continuous function inverse to $f$. If $f$ is differentiable at $c \in I$ and $f'(c) \neq0$, then $g$ is differentiable at $d:=f(c)$ and
	\[g'(d)=\frac{1}{f'(c)}=\frac{1}{f'(g(d))}\]
\end{theorem}

\begin{theorem}
	Let $I$ be an interval and let $f:I \rightarrow \R$ be strictly monotone on $I$. Let $J:= f(I)$ and let $g:J \rightarrow \R$ be the function inverse to $f$. If $f$ is differentiable on $I$ and $f'(x) \neq 0$ for $x \in I$, then $g$ is differentiable on $J$ and
	\[g' = \frac{1}{f' \circ g}\]
\end{theorem}
