# The Derivative

Let \(f\) be some function. We would like to rewrite \(f\) as a function that is somewhat similar to a polynomial: choose some fixed number \(x_0\). We want \[f(x) = A_0+A_1(x-x_0)+R(x)(x-x_0)^2,\] where \(A_0\) and \(A_1\) are constants and \(R\) is some remainder function of \(x\). Let's keep track of the assumptions we have to make on \(f\) in order to figure out what \(A_0, A_1,\) and \(R(x)\) are.

First, we see that when \(x=x_0\) we immediately get \(f(x_0)=A_0\). Thus, if \(f\) is defined at \(x_0\), then we can conclude that \(A_0\) is the value of \(f(x_0)\). That was easy.

Next, let's try to pull a similar trick to find \(A_1\). Observe that \begin{align*} A_1(x-x_0) = f(x)-f(x_0) - R(x)(x-x_0)^2. \end{align*} When \(x\ne x_0\) we can write \begin{align*} A_1 = \frac{f(x)-f(x_0)}{x-x_0} - R(x)(x-x_0). \end{align*} At this point we can recall what we learned about limits: we cannot let \(x\) actually be \(x_0\), but we can take a limit as \(x\) goes toward \(x_0\) on both sides: \[A_1 = \lim_{x\to x_0}A_1=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0} - 0\] so long as \(\lim_{x\to x_0}(f(x)-f(x_0))/(x-x_0)\) and \(\lim_{x\to x_0}R(x)\) exist. We define \[f'(x_0)=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0},\] and conclude that \(f(x) = f(x_0)+f'(x_0)(x-x_0)+R(x)(x-x_0)^2.\) Now \(R(x)\) is just whatever is left over at this point: define \[ R(x)=\frac{f(x)-f(x_0)-f'(x_0)(x-x_0)}{(x-x_0)^2}. \] To summarize, given any point \(x_0\), if \(f\) is defined at \(x_0\) and if \(\lim_{x\to x_0}(f(x)-f(x_0))/(x-x_0)\) and \(\lim_{x\to x_0}R(x)\) exist, then we can write \begin{equation} f(x) = f(x_0)+f'(x_0)(x-x_0)+R(x)(x-x_0)^2. \end{equation}

These three terms tell us a lot about our function \(f\). The first term
\(f(x_0)\) tells us the value of the function at one point, in some sense giving us
an idea of how big the function is, where it is located relative to the
\(x\)-axis. The second term is something we will study for the rest of the
chapter: it is the *derivative* of \(f\) at \(x_0\). This is arguably
the central concept in the Calculus. The remainder term is more complicated,
but still interesting. We will spend some time discussing its properties later.

Since we will be discussing the concept for the rest of this work, we define the derivative formally.